-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Why does nvm use
have to be run again when installing a package that exists on other version
#3218
Comments
that’s not ok - when you’re using v20, packages installed on v18 should not be available. That suggests that your PATH is incorrect (which may have been revealed by some of the items in the template :-p ) |
Ah sorry about that. Thanks for the explanation Okay, I'm using zsh and do have a couple things modifying my PATH in ~/.zshrc (Notably Homebrew, pnpm, and Bun.js) I'll have to check my setup. It seems like every time I run
|
What version of nvm are you using? If not the latest, try updating. |
Was previously running 0.39.1. Just updated to 0.39.5 |
Does that fix the PATH issue? |
No unfortunately, the PATH var is still growing when I use |
Can you share it? If you’re using omz, please share the output of setopt as well. |
[Sorry I removed the issue template because it didn't seem to fit this question]
Background
I installed Node 20 using nvm and then installed a package on Node 20 that I already had on Node 18.
After running
npm install -g <package>
on Node 20, nvm was still targeting the Node 18 version of the package. Only after runningnvm use 20
again did it target the Node 20 version.Question
I guess I would expect nvm to target the Node 20 version of the package immediately after npm installing it, but it stays on Node 18. Is this expected?
Logs
The text was updated successfully, but these errors were encountered: