最近想试下当前的当红炸子鸡 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:
C:\nodejs>npm install express [email protected] node_modules\express ├── [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], [email protected]) ├── [email protected] ([email protected]) └── [email protected] ([email protected], [email protected]) C:\nodejs>
安装百度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 [email protected]+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 [email protected]1.8.13 D:\NodeLearn\node-global\node_modules\fis ├── fis[email protected] ├── fis[email protected].0.7 ├── fis[email protected] ├── fis-deploy-default@0.0.2 ├── [email protected]0.6.2 ├── [email protected]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])
安装报了一个错,但是最终好像还是成功了^_^?
npm报错Error: ENOENT, stat 'D:\NodeLearn\node-global'
时间: 2024-10-06 02:17:46