Skip to content
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

cant switch node version #174

Closed
yuu2lee4 opened this issue Oct 9, 2020 · 4 comments
Closed

cant switch node version #174

yuu2lee4 opened this issue Oct 9, 2020 · 4 comments

Comments

@yuu2lee4
Copy link

yuu2lee4 commented Oct 9, 2020

i have two version installed of node,1412.0 and 14.13.1.The 14.13.1 ver is default,the 14.12.0 is current,when i use nvs use 14.13.1,the result of command node -v is 14.13.1,but when i reopen the terminal,the curren version change to 14.12.0,the result of command node -v is 14.12.0.

os: macos 10.15.7
nvs: 1.6.0

@yuu2lee4
Copy link
Author

yuu2lee4 commented Oct 9, 2020

After i rm the 14.12.0,i must use command nvs use 14.13.1 every time when i open the terminal.

@jasongin
Copy link
Owner

The nvs install command (doc) should add a line to your .bashrc/.zshrc that will set up the node environment whenever a new shell is opened. Can you try running that (again)? Or does it not work?

@yuu2lee4
Copy link
Author

I notice there is aline export PATH=~/.npm-global/bin:/Users/yuli/.nvs/node/14.12.0/x64/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin in my ~/.zshrc,but it not work after i delete /Users/yuli/.nvs/node/14.12.0/x64/bin:/usr/local/bin .

@yuu2lee4
Copy link
Author

yuu2lee4 commented Oct 13, 2020

It worked after I deleted export NVS_HOME="$HOME/.nvs" and [ -s "$NVS_HOME/nvs.sh" ] && . "$NVS_HOME/nvs.sh" and excuted . "$NVS_HOME/nvs.sh" install command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants