Home > Article > Web Front-end > How to lower the node version
Method to lower the node version: first install the n module globally; then uninstall the specified node version through "n rm v8.16.0"; then install nvm; finally install the specified version through "nvm use 10.16.2" Can.
The operating environment of this article: Windows 7 system, nodejs version 10.16.2, DELL G3 computer.
Upgrade and downgrade of Node version
In the development project, we may need to frequently switch node versions to cope with different development environments, so we need to often use different versions node
1. Install the npm plug-in n and manage the node version through the n module
1. Install the n module globally
npm instlal -g n
2. Install the current stable version
n stable或者sudo n stable
3. Install the latest version of
n latest或者sudo n latest
4. Install the specified version of node
n v8.16.0
5. Uninstall the specified node version
n rm v8.16.0
[Recommended: nodejs video tutorial】
2. Use nvm to manage node version
1. Install nvm
brew install nvm
2. Use nvm to install node version
Install the latest version
nvm isntall node
Install the specified version
nvm install 8.16.0
3. View all versions
nvm ls
4. Switch node version
Use the latest version
nvm use node
Use the specified version
nvm use 10.16.2
Usually I will use the second method
For example: I use node@6.13.2 in a project, and the new project uses node @8.16.0,
First install node@8.16.0, nvm install 8.16.0,
Then,nvm use 8.16.0
The above is the detailed content of How to lower the node version. For more information, please follow other related articles on the PHP Chinese website!