In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you how to change the node default version of nvm, I hope you have something to gain after reading this article, let's discuss it together!
How to change the default version of node by nvm: 1. Open the terminal command window;2. Set the default version of nodejs by executing the command "nvm alias default v4.3.0".
Operating environment of this article: macOS 10.15 system, nvm v0.34.0 version, macbook pro 2020 computer.
nvm set nodejs default version
Windows version management software is nodist
The node version management of mac system is based on nvm
Every time you restart vscode, the default version nvm ls sees reverts to v5.5.
Use the following command to change the default version: nvm alias default v4.3.0 so you don't have to switch versions every time
NVM installation:
Click Jump (github address of nvm project), find the place where install script is located, then copy it, paste it in terminal and run it.
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
According to the terminal prompt
=> Profile not found. Tried ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile.
=> Create one of them and run this script again
1. So use vim to create a ~/.bash_profile file
JasonLamdeMacBook-Pro:~ jasonlam$ vim ~/.bash_profile
2. After switching vim to insert state, write the script given, and then:wq exit
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
:wq
Restart the terminal and enter nvm --version to display the version number, i.e. successful installation!
Common commands for installing node, npm(cnpm), and nvm on Mac:
Nvm common command
● nvm install stable Install the latest stable version node
● nvm install Install the specified version, such as: install v4.4.0, nvm install v4.4.0
● nvm uninstall removes the specified version installed, syntax similar to install
● nvm use Switch to use the specified version node
● nvm ls lists all installed versions
● nvm alias default such as: nvm alias default v11.1.0
After reading this article, I believe you have a certain understanding of "how to change the node default version of nvm". If you want to know more about it, welcome to pay attention to the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.