Closed ptolemybarnes1649 closed 6 months ago
With download = false
it's essentially what comes up first in your PATH
so should be the same thing as if you open a terminal and type node
or npm
(keeping in mind that your .zshrc
or similar may change this and those changes may or may not be reflected depending on how you run)
Are you using Windows?
Taking a closer look at the logic behind this https://github.com/node-gradle/gradle-node-plugin/blob/8d4e9910274a1b26dcdb761d2892b73efef54826/src/main/kotlin/com/github/gradle/node/variant/VariantComputer.kt#L38-L43 I realize that with download set to true it'll use node.exe
instead of node
but with download set to false it'll always use node
Which could get relevant if you have a node.cmd
or node.bat
, which is generally fine
If you're not, it could be that depending on how you run the nvm
changes haven't been properly applied, easiest way to test this is probably to create an ad-hoc test and print the content of PATH
@deepy Not on windows - I'll try your suggestion of printing PATH
.
I'm asking this question as I've seen some surprising behaviour where the plugin uses a version of node that is not the default (as set by nvm).
Thanks for your help.