0 express
我是nodeJS的新手,我正在尝试将express安装为依赖项,但它给我以下错误:
C:\wamp\www\ExpressJS\node>npm install express --save
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "express" "--save"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ENOSELF
npm ERR! Refusing to install express as a dependency of itself
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\ExpressJS\node\npm-debug.log
**any help would be much appericiated, This is my npm-debug file**
Run Code Online (Sandbox Code Playgroud)
Sid*_*ry 5
好吧,我知道您的确切问题是什么,也就是说,在创建项目时
npm初始化
您已将该名称作为依赖项名称。
因此,通过进入package.json来更改项目的名称,并提供一个不同的名称。然后使用相同的命令再次安装
npm install-保存
我可以说您不会再遇到相同的错误
| 归档时间: |
|
| 查看次数: |
1395 次 |
| 最近记录: |