Nodejs installation, environment configuration, and removal of NPM global configuration under Windows system

Source: Internet
Author: User
Tags dotnet tortoisesvn

Nodejs Installing and setting NPM global paths

Remove NPM Global Path configuration

First, Nodejs install and set NPM global pathFirst step: Download the installation file

Download Nodejs, official website: http://nodejs.org/download/, I download here is node-v8.4.0-x64.msi, such as

Step Two: Install Nodejs

After the download is complete, double-click "Node-v0.10.28-x86.msi" to start installing Nodejs and customize the installation under D:\Program Files\nodejs.

In the cmd console input: node-v, the console will print out: v0.10.28, the version prompt indicates that the installation was successful.

Check the system environment variable path , if there is an automatic add Nodejs installation directory, such as, finally have automatically added my installation directory;

C:\programdata\oracle\java\javapath;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot %\system32\windowspowershell\v1.0\; C:\Program Files\tortoisesvn\bin;d:\program Files\tortoisesvn0\bin; C:\Program Files\emeditor;%java_home%\bin;%java_home%\jre\bin; C:\Program Files\Microsoft SQL Server\ the\tools\binn\; C:\Program files\dotnet\;%android_home%\tools;%android_home%\platform-tools;%java_home%\bin;%android_home%\ Tools;%android_home%\platform-tools;%android_home%\build-tools\21.1.2;D: \program Files\apache-ant-1.9.9-bin\apache-ant-1.9.9\bin;%gradle_home%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem; C:\users\administrator.cn-20151209rina\appdata\roaming;d:\program files\nodejs\; C:\programdata\oracle\java\javapath;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem;%systemroot %\system32\windowspowershell\v1.0\; C:\Program Files\tortoisesvn\bin;d:\program Files\tortoisesvn0\bin; C:\Program Files\emeditor;%java_home%\bin;%java_home%\jre\bin; C:\Program Files\Microsoft SQL Server\ the\tools\binn\; C:\Program files\dotnet\;%android_home%\tools;%android_home%\platform-tools;%java_home%\bin;%android_home%\ Tools;%android_home%\platform-tools;%android_home%\build-tools\21.1.2;D: \program Files\apache-ant-1.9.9-bin\apache-ant-1.9.9\bin;%gradle_home%\bin;%systemroot%\system32;%systemroot%;%systemroot%\system32\wbem; C:\Users\Administrator.CN-20151209RINA\AppData\Roaming;D:\Program files\nodejs\;%node_path%

Step Three: NPM installation (domestic image installation NPM see article)

Since NPM has been integrated with the new version of Nodejs, NPM has been installed as well. You can also use the cmd command line to enter "Npm-v" to test for successful installation.

The construction of conventional nodejs has been completed so far, so you can enter the "cmd" input "node" into node development mode, enter your Nodejs first sentence: "Hello World"-Input: Console.log (' Hello World ‘)。

Fourth Step: Install the relevant environment

We will first configure the NPM Global Module storage path and the cache path, for example, I would like to put the above two folders in the Nodejs home directory, the Nodejs under the new "Node_global" and "Node_cache" two folder. Such as:

Start cmd, enter:

" D:\Program Files\nodejs\node_global "  "D:\Program files\nodejs\node_cache"

After the command finishes, you can open the "C:\USERS\ADMINISTRATOR.CN-20151209RINA\.NPMRC" file to see if the file was changed successfully, and right-click to open the file with Notepad

So, in fact, modify the path in addition to the cmd command, you can also directly modify the. npmrc file, add the following two lines, the path is changed to its own directory

prefix=D:\Program files\nodejs\node_globalcache=d:\program Files\nodejs\node_cache

Second, remove NPM global path configuration

The method is to delete the "C:\USERS\ADMINISTRATOR.CN-20151209RINA\.NPMRC" file. If the. NPMRC is not in this directory, search globally

Reference article: http://blog.csdn.net/pengpegv5yaya/article/details/51885829

Nodejs installation, environment configuration, and removal of NPM global configuration under Windows system

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.