我无法让 npm 工作,我的 package.json 文件
"scripts": { "build": "build.js" }
而且我有一个 build.js 文件在同一个文件夹中,只是 console. log。
当我跑的时候
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.
What's going wrong? I'm copying the example documentation.