node. JS Development Environment Configuration

Source: Internet
Author: User

1. Normal installation method:

This way I believe everyone is very familiar with direct node's official website: http://nodejs.cn/download/Download the version type that you need,. msi is directly installed, follow the prompts directly next: Zip is in compressed form, need to decompress, and then configure environment variables, Relatively more cumbersome. The main point here is to say the following installation method------"

2. Multi-Version installation method: 1. Uninstall the existing node. JS 2. Download NVM (Nodejs version mangerment) URL: https://github.com/coreybutler/nvm-windows/releases or download from my Web disk: https://pan.ba Idu.com/s/1k_aemspcic_ptrxo7tnzja Password: il86 3. Create the Dev directory in the C drive and create the Nodejs and nvm two subdirectories under Dev and unzip the NVM package (or copy it in)

Then go back to the C drive, find the Nvm folder under the Dev folder you just created, then find the Install.cmd file right-click and choose Run as Administrator in the pop-up menu, and a black dialog will pop up as shown:

After the Black dialog box pops up, press ENTER to generate the file,

At this point, the Black dialog box is no longer useful, you can click Close, Also in the NVM file to create a new Setting.txt file, and copy the content to the file, or in the generated file Setting.txt File menu Choose Save As, save to the Nvm folder under Dev. Then open the Setting.txt file to configure the path for root and path. The path that is generated by default is incorrect. Root is the path to the NVM folder and path is the Nodejs folder. First we go back to the NVM folder and look at its address bar:

That's what it looks like. Then double-click in the Address bar and copy the path of the NVM and paste it directly to root: behind, path. After setting it:

The bottom two do not move, then save, you can exit.

4. Configuring environment variables for NVM and Nodejs

First open the Command window through the Win+r key, enter the SYSDM.CPI carriage return, open the System Properties window, select Advanced, and then click Environment variable, the environment variable dialog box pops up,

In the Environment Variable dialog box below the system variable to find the Nvm_home variable double-click, will pop up the editing system variable, when the variable name defaults to Nvm_home, we only need to edit the variable value, the variable value is the path of the NVM folder, that is C:\DEV\NVM We can copy it to the Setting.txt file,

Similarly, the Nvm_symlink variable is found, and the value of the variable is nodejs path.

5. Add the two configured environment variables to the path

Find the path in the variable system, and double-click, pop-up Edit System Variable dialog box, then check all the contents of the variable value, copy it to the Code Editor, at last add the two variables just configured, note that two variable names are used as% package, and the semicolon link between them,

Test is configured successfully

Open the Command window via Win+r. Enter cmd, enter NVM version, and if the version number appears, the NVM installation is successful

Configure the NODEJS environment:

Download and install the required version by ordering NVM Install latest (installing the latest version of node) or NVM install version number

Through the command NVM List view all currently downloaded versions of node. js If there is an asterisk before the version number, which represents the version currently in use

Select which version of Nodejs you want to use by commanding the NVM usage version number

The version of node currently in use can be queried by command node-v

node. JS Development Environment Configuration

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.