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
Nvm uses system node instead of default #1184
Comments
Do you have a |
No, I don't have
export NVM_DIR="$HOME/.nvm"
if [[ -s "$NVM_DIR/nvm.sh" ]]; then
source "$NVM_DIR/nvm.sh"
fi There is the
|
@andre487 ok so when you run: nvm use node
nvm current
nvm ls
nvm use system
nvm current
nvm deactivate
node --version what's the output you get? |
@andre487 also, do you have anything - anything at all - modifying |
@ljharb Yes, that's it. I had a Thank you! |
In my case, "system" node was installed inadvertently by installing yarn via MacPorts. It seems that port install isn't smart enough to look for nvm node, so it installed a copy in opt/local/. And in my .zshrc, it was prepending the path to there before calling nvm.sh. If I removed that prepending, it worked, but of course I want MacPorts to work so that's not an option. Interestingly, sudo rm -f /opt/local/bin/node
sudo rm -rf /opt/loca/include/node Then restart CLI, of course. No more warnings, and it doesn't see a "system" version installed. |
nvm can’t uninstall something it didn’t install; you’d have to use macports to do that, or do it manually as you indicated. |
Sure. I came across something that suggested using Anyhow, also noting that |
For those who installed |
Yes, even though I installed yarn with brew via |
That’s because homebrew recently broke yarn users by removing “without node” as an option. |
Looks like it's still a problem |
@jerrygreen please file a new issue. |
This fixed it for me. |
If none of the above solutions works for you, here are the steps I followed:
NOTE: It is advised to uninstall node before making use of nvm. |
Worked for me too best to move this
down to the bottom of ~/.zshrc or ~/.bash_profile |
manual removing by |
@xmihal03 |
Thanks. In my case, I had nvs installed at some stage. Remove those lines fixed the issue. |
That fixed it for me. I had a bunch of |
For me it was asdf that was the problem, so you can just unlink from there, or depending on how desperate you are, uninstall asdf. Run |
|
This worked for me, I had |
For Linux users: if you installed sudo apt purge nodejs
sudo apt autoremove nodejs Open a new terminal and |
I had the same problem on mac and used the brew equivalent: brew uninstall node
nvm use <versionNr> After removing "system" is not listed when using "nvm list". For me the problem started because I used "brew update && brew upgrade" for all my packages and this conflicted for NVM |
First you need to check which node is active with |
This seems to work for me temporarily. As soon as I restart my CLI, nvm reverts to using system. Any ideas what's happening? When I run If I |
@MrUltimate i assume nodenv is something you have installed that’s interfering. You could try removing it? |
Yes, thanks. I did end up removing it and then setting both my default and stable alias so that nvm would default to my preferred version. Without that it would always default to none. |
|
OSX 10.11.6, zsh 5.2
I have this nvm settings:
This listing is from new terminal's tab. And by default nvm uses not default version but the system.
The text was updated successfully, but these errors were encountered: