Home >Web Front-end >JS Tutorial >How to switch between multiple versions of Nodejs in Windows environment?

How to switch between multiple versions of Nodejs in Windows environment?

青灯夜游
青灯夜游forward
2021-04-26 10:36:132169browse

This article will introduce to you how to switch between multiple versions of Node in the Windows environment. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to switch between multiple versions of Nodejs in Windows environment?

NodeJS multi-version switching (Windows)

  • Prioritize installing the nvm version management tool

  • Install nodejs through the installation package: The directory is set to the nvm installation directory and the version number of nodejs is distinguished

  • By nvm install [ version] Install the specified version node

Related recommendations: "nodejs Tutorial"

NVM version management tool :

Download address: https://github.com/coreybutler/nvm-windows

Directory after installation:

How to switch between multiple versions of Nodejs in Windows environment?

Command usage:

  • View the list of installed versions: nvm list

  • Switch node version: nvm use [version]

  • Turn on/off version control: nvm on/off After turning it on A nodejs shortcut will be created in the Program Files folder of the C drive for association, and will be deleted after closing.

  • Install nodejs through nvm: nvm install 10.23.2

  • Set the nodejs version management directory: nvm root [path] Default nvm root directory

NodeJS installation package download:

After installing the latest version of node, if you install a lower version of node through the installation package, you will be prompted to close

  • Download address: http://nodejs.cn/download/

  • aliyun Mirror: https://npm.taobao.org/mirrors/node/

For more programming-related knowledge, please visit: Programming Video! !

The above is the detailed content of How to switch between multiple versions of Nodejs in Windows environment?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.cn. If there is any infringement, please contact admin@php.cn delete