https://kotlinlang.org logo
#javascript
Title
# javascript
s

Shan

08/22/2022, 5:39 AM
Hello. Getting this error when using a npm dependency:
Copy code
The engine "node" is incompatible with this module. Expected version ">=16.0.0". Got "14.17.0"
Is there a way to configure the
kotlinNpmInstall
task to use a different version of node?
e

ephemient

08/22/2022, 6:25 AM
https://kotlinlang.org/docs/js-project-setup.html#use-pre-installed-node-js you can write
Copy code
plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
    configure<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension> {
        nodeVersion = "16.13.0"
    }
}
instead of
download = false
if you want it to auto-provision that version
s

Shan

08/22/2022, 6:56 PM
Thanks!
41 Views