nodeJs installation configuration

http://www.ydcss.com/archives/18  (Getting started with gulp)

http://blog.csdn.net/wkkyo/article/details/52799488  (gulp path modification)

http://www.cnblogs.com/domaple/p/5904974.html  (modification of gulp global path)

 

1. First download the stable version on the official website of nodejs , click the huge green Download button, it will select the corresponding version (.msi file) according to the system information. Then install it like you install QQ (the installation path is optional).

 

2. Use

C:\Users\yjph83>node -v

v6.9.1

C:\Users\yjph83>npm -v

3.10.8

It means the installation was successful!

 

Modify the path: In the nodejs installation directory, the npmrc file whose path is .\node_modules\npm is modified to:

prefix=H:\Program Files\nodejs\node_global

 

cache =H:\Program Files\nodejs\node_cache

 

 

New environment variable  NODE_HOME: H:\Program Files\nodejs

Addition during change in path:% NODE_HOME%;% NODE_HOME% \ node_modules;% NODE_HOME% \ node_global

 

Under the cmd command interface:

  npm install -g nrm installs nrm OK; #Because nrm can switch to use mirrors, it is installed globally through the -g parameter;

 nrm ls #List all mirrors
 nrm use taobao #Switch to Taobao mirror

 Go to the project page directory and run the command: npm install

H:\develop\HBuilderProject\mucFrontend>npm install #Install project dependencies according to the relevant package.json file

It is successful when something like the following occurs at the end of the operation

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm WARN [email protected] No description

npm WARN [email protected] No repository field.

 

H:\develop\HBuilderProject\mucFrontend>npm run dev #Run through npm run command, package and start debugging service according to webpack

 

(webpack)-dev-server/client?http://localhost:81 3.97 kB {10} [built]   

That is, the service binding access address and port have been configured OK in the configuration file;

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326972271&siteId=291194637