【发布时间】:2016-01-03 01:43:18
【问题描述】:
我无法让 npm 工作。我的 package.json 文件有
"scripts": { "build": "build.js" }
我在与 console.logs 相同的文件夹中有一个 build.js 文件。
当我跑步时
npm run build
我得到了错误
The system cannot execute the specified program.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v4.1.1
npm ERR! npm v3.3.5
npm ERR! code ELIFECYCLE
如果我移动 build.js 文件并将我的 package.json 文件更改为有一个子文件夹
"scripts": { "build": "build/build.js" }
然后我得到错误
'build' is not recognized as an internal or external command, operable program or batch file.
怎么了?我正在复制example documentation。
【问题讨论】:
标签: javascript node.js npm