当我尝试为 Nodejs Express 应用程序创建新项目时,出现以下错误 -
Create Express Project
Error creating Node.js Express App. Failed command:
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" install
Exit code: -1
我正在使用网络 Storm 。
package.json:
{
"name": "untitled4",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"ejs": "~2.3.3",
"express": "~4.13.1",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0"
}
}
最佳答案
就我而言,原因是项目文件夹名称;这是xxxx xxxx
。修复方法是删除项目名称中的空格,因此我将其更改为 xxxx_xxxx
。
关于node.js - 创建 Node js Express 应用程序项目时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32009838/