-
Notifications
You must be signed in to change notification settings - Fork 773
-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: tool installed in global nodejs are not available in project with a different nodejs version #1727
Comments
I have the same issue with $ asdf --version
v0.14.0
$
$ asdf list nodejs
16.18.0
16.20.2
18.15.0
18.16.0
18.17.1
18.18.0
18.18.2
18.19.1
20.10.0
*20.11.1
$ node --version
v20.11.1
$
$ cat .tool-versions
nodejs 20.11.1
$
$ npm list -g | grep yarn
└── [email protected]
$
$ yarn --version
No preset version installed for command yarn
Please install a version by running one of the following:
asdf install nodejs 20.11.1
or add one of the following versions in your config file at /Users/v_pgoncalves/Development/GoDaddy/cx-spa/.tool-versions
nodejs 18.16.0 |
I'm having this problem as well
What exactly is this line doing? I suspect that it's making the old version available, the one that you don't want, to what you're trying to run. My goal is to update from nodejs 16.15.0 to 18.0.0. Installing 18 and then telling asdf to use it with a .tool-versions does not work, even after doing |
which isn't visible to nodejs 18.19.1. |
Describe the Bug
I've got a global .tool-versions file:
and installed typescript-language-server into it:
In one of my projects I've got this in my .tool-versions:
and tsserver is not available:
When I change my /Users/sebastianblask/Code/project/.tool-versions to:
tsserver works, but I don't think this should be necessary? It's also no desirable because the global .tool-versions is specific to my setup and I don't want to force the versions in there onto the people that work on the project.
Steps to Reproduce
See description ^
Expected Behaviour
asdf should fall back to global nodejs automatically
Actual Behaviour
asdf gives workaround instead of it just working
Environment
$ asdf info OS: Darwin Sebastians-MacBook-Pro.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 arm64 SHELL: zsh 5.9 (x86_64-apple-darwin23.0) BASH VERSION: 5.2.21(1)-release ASDF VERSION: v0.14.0-ccdd47d ASDF INTERNAL VARIABLES: ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions ASDF_DATA_DIR=/Users/sebastianblask/.asdf ASDF_DIR=/Users/sebastianblask/.asdf ASDF_CONFIG_FILE=/Users/sebastianblask/.asdfrc ASDF INSTALLED PLUGINS: direnv https://github.com/asdf-community/asdf-direnv.git master 2b649c8 editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git master 9326459 github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git master e0605b7 iamlive https://github.com/chessmango/asdf-iamlive.git main a986640 nodejs https://github.com/asdf-vm/asdf-nodejs.git master 9c4e0f2 pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git master 26bfc42 python https://github.com/danhper/asdf-python.git master 5e277e2 ruby https://github.com/asdf-vm/asdf-ruby.git master 3035a4a rust https://github.com/asdf-community/asdf-rust.git master 8436012 shfmt https://github.com/luizm/asdf-shfmt.git master a42c5ff steampipe https://github.com/carnei-ro/asdf-steampipe.git main 261baed terraform-docs https://github.com/looztra/asdf-terraform-docs.git master acfd01c terraform https://github.com/asdf-community/asdf-hashicorp.git master 197e3ec tflint https://github.com/skyzyx/asdf-tflint.git master 37e7eb9 tfsec https://github.com/woneill/asdf-tfsec.git main c36fac5 trivy https://github.com/zufardhiyaulhaq/asdf-trivy.git master 537a22a
asdf plugins affected (if relevant)
nodejs - had the same problem with eslint_d for example, so it's not a problem of typescript-language-server. I could not reproduce the problem with Python and pre-commit
The text was updated successfully, but these errors were encountered: