Windown下最简安装nodejs和npm

Windown下最简安装nodejs和npm

一、下载node.exe(在写本文时最新版为6.2.2)

http://nodejs.org/dist/v6.2.2/win-x86/node.exe

二、下载npm:

https://nodejs.org/download/release/npm/npm-1.4.9.zip

三、把下载的node.exe和npm-1.4.9.zip放到同一个目录,例如:

d:\nodejs

然后把npm-1.4.9.zip解压到当前目录,解压后目录为:

d:\nodejs

     |---- node_modules   (目录)

     |---- node.exe

     |---- npm.cmd

     

四、把d:\nodejs加入PATH,这样就算安装好了,然后我们用npm安装一遍localtunnel试试,至于localtunnel为何物,请参见我的另一个帖子

五、打开命令行窗口,输入:

npm install -g localtunnel

然后出现:

npm http GET https://registry.npmjs.org/localtunnel

npm http 200 https://registry.npmjs.org/localtunnel

npm http GET https://registry.npmjs.org/localtunnel/-/localtunnel-1.8.1.tgz

npm http 200 https://registry.npmjs.org/localtunnel/-/localtunnel-1.8.1.tgz

npm http GET https://registry.npmjs.org/request

npm http GET https://registry.npmjs.org/openurl

……

D:\nodejs\npmjs\lt -> D:\nodejs\npmjs\node_modules\localtunnel\bin\client

[email protected] D:\nodejs\npmjs\node_modules\localtunnel

├── [email protected]

├── [email protected] ([email protected])

├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

表明localtunnel安装完成,同时也证明nodejs和npm安装无误

猜你喜欢

转载自sheng.iteye.com/blog/2306214