Nodejs Installation and Configuration

Source: Internet
Author: User
Tags sublime text

Recently work in contact with a new editing tool--sublime Text, which some plug-ins need Nodejs support, toss down, now the Nodejs installation and configuration process to record down.

1. First, download the installation package

Access to the official website https://nodejs.org/en/, according to their own situation to download the installation package, this step is not much to say

2. Installing Nodejs

I downloaded the installation package for Node-v6.11.0-x64.msi, double-click to run, has been the next step, OK, this step is not much to say

3. Verification

Win + R open cmd,

Enter Node-v, you can view the Nodejs version, I version is v6.11.0,

Enter Npm-v, you can view the NPM installation version, my version is 3.10.10,

See the command line output version number indicates that the NODEJS installation was successful;

4. Environment configuration

I install directory modified to D, directory for D:\Program Files\nodejs, in this directory to establish Node_global and Node_cache two folders,

Win+r open cmd. Enter the following command:

prefix "D:\Program files\nodejs\node_globalcache " D:\Program files\nodejs\node_cache"

This step is to modify the Global module installation path and cache path, if not modified by default installed in the Nodejs\node_modules directory;

After modifying the global path, you need to modify the environment variables, ① the new variable under ' system variable (S) ', the variable name is: Node_path, the variable value is: D:\Program files\nodejs\node_global\node_modules;

② Modify the path variable under the user variable and change the default value to: D:\Program Files\nodejs\node_global

5. Testing

CMD, enter the following command:

NPM Install Express-g

And then, under D:\Program files\nodejs\node_global\node_modules, you can see the newly downloaded Express installed.

The above content online has detailed picture and text tutorial, I here just record the installation process, in addition to the Baidu process learned to write something, also record:

1.win+r, enter sysdm.cpl, you can open the System properties, select ' Advanced ' tab page, you can open the environment variable here

2.NPM can install many plug-ins,-G indicates the meaning of the global installation

3. If you want to restore NODEJS environment settings, you can delete the. npmrc file (use everything global search);

4.NPM View Perfix Commands:

npm Config listnpm config lsnpm config get prefix

NPM Common commands:http://www.cnblogs.com/PeunZhang/p/5553574.html

Nodejs Installation and 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.