Home > Web Front-end > JS Tutorial > body text

How to lower the node version

藏色散人
Release: 2023-01-03 09:27:16
Original
54719 people have browsed it

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.

How to lower the node version

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
Copy after login

2. Install the current stable version

n stable或者sudo n stable
Copy after login

3. Install the latest version of

n latest或者sudo n latest
Copy after login

4. Install the specified version of node

n v8.16.0
Copy after login

5. Uninstall the specified node version

n rm v8.16.0
Copy after login

[Recommended: nodejs video tutorial

2. Use nvm to manage node version

1. Install nvm

brew install nvm
Copy after login

2. Use nvm to install node version

Install the latest version

nvm isntall node
Copy after login

Install the specified version

nvm install 8.16.0
Copy after login

3. View all versions

nvm ls
Copy after login

4. Switch node version

Use the latest version

nvm use node
Copy after login

Use the specified version

nvm use 10.16.2
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!