halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
467 stars 86 forks source link

When graalvm and nodejs are both installed, npm defaults to the graalvm packaged npm, rather than node's #165

Open snowe2010 opened 3 years ago

snowe2010 commented 3 years ago

From https://github.com/asdf-vm/asdf/discussions/1080

nodejs 12.18.4
java graalvm-21.0.0+java11
maven 3.6.3
python 3.9.2
> npm install -g aws-cdk-local aws-cdk
/Users/tyler/.asdf/installs/java/graalvm-21.0.0+java11/languages/js/bin/cdk -> /Users/tyler/.asdf/installs/java/graalvm-21.0.0+java11/languages/js/lib/node_modules/aws-cdk/bin/cdk
/Users/tyler/.asdf/installs/java/graalvm-21.0.0+java11/languages/js/bin/cdklocal -> /Users/tyler/.asdf/installs/java/graalvm-21.0.0+java11/languages/js/lib/node_modules/aws-cdk-local/bin/cdklocal
+ aws-cdk-local@1.65.8
+ aws-cdk@1.129.0
updated 2 packages in 7.334s

This most likely wouldn't be a problem (for me), but it appears like the graalvm paths are not added to the shim path, so I'm unable to even execute the installed package. This seems like a very niche issue, so I'm not sure what the solution here should be. Maybe just check if nodejs is installed and don't shim the languages/js folder if it is.