node.js - 创建 Node js Express 应用程序项目时出现错误

标签 node.js windows webstorm

当我尝试为 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/

相关文章:

python - 在 Pyzo 上安装 pyephem 或 astropy

javascript - 如何忽略 tslint 的特定目录或文件?

syntax-highlighting - Jade 标记在 WebStorm 中的模板内突出显示

javascript - 使用express和node.js重定向301。 GET 未被调用

node.js - Express 3 上的 EJS 布局

c++ - NodeJS 文件系统观察两次或更多次抛出事件

windows - 更改 Windows 上可执行命令的顺序

javascript - 了解 Node - 编写异步代码

c++ - MFC基本结构题

json - PhpStorm/WebStorm REST 客户端 : easy way to send JSON?