NVM installation and configuration detailed tutorials

Source: Internet
Author: User

NVM is Nodejs version management tool, why to use NVM, you can Baidu to this article compared to have to use the reason, we know Nodejs official update is very fast, sometimes business needs to use a certain version, if the use of MSI installation, although the installation is very simple, But in the back of the trouble, here is my daoteng a day to summarize down the tutorial, as long as follow this to configure, absolutely no problem, we do not have trouble, learned that can save time.

I use the Win32 system, first install NVM, then Nodejs, and finally NPMNVMNVM detailed installation steps: One: Run as Administrator Install.cmd file, set file path
Root:c:\nvmpath:c:\nodejsarch:32 Proxy:none Make sure there is a setting.txt file in the directory (the picture is the one I configured, not those folders by default) cmd Command Line Input NVM Enter the version number of the NVM to see that the NVM installation successfully downloaded the required Nodejs version, after decompression renamed (such as v6.9.1) into the NVM directory, note that if there are nested folders to take the file to the outer two: environment variable configuration: Click My Computer "Properties" Advanced Settings " Environment Variables 1. Remove the NVM variables from the system: Nvm_home and NVM_SYMLINK2. Open path: Delete the variable C:\NVM that the NVM automatically adds; C:\Program files\nodejs3. Configuring User variables: Nvm_home = C:\NVM Nvm_symlink = C:\nodejs Path =%nvm_home%;%nvm_symlink% configuration Complete Save 4.cmd Command line: NVM use 6.9.1 (install required version), 32-bit system (NVM with 6.9.1 32), see now Useing node v6.9.1 indicates that the installation succeeds at the same time that there is a Nodejs shortcut folder in the NVM sibling directory, and you want that version to switch to that version, for example (NVM use 7.2.0) Three: NPM installation and environment variable configuration 1. Copy the NPM package under v6.9.1, I put it in the NVM folder 2. Environment variable configuration:
Npm_home = C:\NVM\NPM
Path =%npm_home%3. Create a new file in the user directory (for example, my: C:\Users\admin). The NPMRC content is as follows: Cache=c:\nvm\npm-cache prefix=c:\nvm\npm4. Restart the Command window: NPM Config List view configuration log showing that you configured the directory to indicate that the installation was successful here NVM Nodejs NPM has been installed successfully, then open a command window to install a package test, NPM Install-g Gulp, after installation will see NPM " Node_modules directory has a new download package, because NPM and Nodejs is separate, no matter you switch to any version, do not need to reinstall these packages, although the official NPM package integrated into the Nodejs, but in order to switch convenience, must be separated by three, If you encounter any problems can give me a message, see after will reply

NVM installation and configuration detailed tutorials

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.