npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'

最近想试下当前的当红炸子鸡 Nodejs,在安装配置时,发生了下面的错误:

C:\nodejs\npmjs\bin>cd ..

C:\nodejs\npmjs>cd ..

C:\nodejs>npm -v
1.4.28

C:\nodejs>npm config set prefix "D:\NodeLearn\node-global"

C:\nodejs>npm config set cache "D:\NodeLearn\node-cache"
Error: ENOENT, stat 'D:\NodeLearn\node-global'

 原因是没有手动建立文件夹: node-global 和 node-cache,收到建立文件夹之后,就不报错了。

C:\nodejs>npm config set cache "D:\NodeLearn\node-cache"

C:\nodejs>npm config set prefix "D:\NodeLearn\node-global"

 然后将 D:\NodeLearn\node-global, C:\nodejs\node_modules 加入系统 path.

 

安装express:

 

安装百度fis:

C:\nodejs>npm install -g fis
npm ERR! git clone https://github.com/pipobscure/fsevents undefined
npm ERR! git clone https://github.com/pipobscure/fsevents undefined
npm WARN optional dep failed, continuing fsevents@git+https://github.com/pipobscure/fsevents#7dcdf9fa3f8956610fd6f69f72c67bace2de7138
npm WARN optional dep failed, continuing [email protected]
D:\NodeLearn\node-global\fis -> D:\NodeLearn\node-global\node_modules\fis\bin\fis
fis@1.8.13 D:\NodeLearn\node-global\node_modules\fis
├── fis[email protected]
├── fis[email protected]
├── fis[email protected]
├── fis-deploy-default@0.0.2
├── colors@0.6.2
├── commander@1.3.2 ([email protected])
├── fis[email protected] ([email protected])
├── fis[email protected] ([email protected])
├── fis[email protected] ([email protected], [email protected], [email protected])
├── fis[email protected] ([email protected], [email protected])
├── fis[email protected] ([email protected], [email protected])
├── fis[email protected] ([email protected])
└── fis[email protected] ([email protected], [email protected])

安装报了一个错,但是最终好像还是成功了^_^?

你可能感兴趣的:(global)