[英]Getting this error when I am doing npm start
我对这个node.js完全陌生! 如何克服以下错误。 尝试了网上给出的所有可能的解决方案。 并且在更改环境变量后发生了此错误。 请帮我解决问题。 提前致谢。
C:\project\nodetest1>npm start
> nodetest1@0.0.0 start C:\project\nodetest1
> node ./bin/www
npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the nodetest1@0.0.0 start script.
npm ERR! This is most likely a problem with the nodetest1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls nodetest1
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\project\nodetest1
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! nodetest1@0.0.0 start: `node ./bin/www`
npm ERR! Exit status -1
npm ERR!
npm ERR! Failed at the nodetest1@0.0.0 start script.
npm ERR! This is most likely a problem with the nodetest1 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get their info via:
npm ERR! npm owner ls nodetest1
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\project\nodetest1
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\project\nodetest1\npm-debug.log
npm ERR! not ok code 0
package.json是
{
"name": "nodetest1",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "~1.8.1",
"cookie-parser": "~1.3.3",
"debug": "~2.0.0",
"express": "~4.9.0",
"express-session": "^1.9.3",
"jade": "~1.6.0",
"mongodb": "*",
"mongoose": "^3.8.21",
"monk": "*",
"morgan": "~1.3.0",
"nodemon": "*",
"passport": "*",
"passport-local": "*",
"serve-favicon": "~2.1.3"
}
}
这个错误也发生在我身上,这是由于环境中的路径变量导致的,因此只需更改unistall node.js并从系统中删除路径变量,然后从AppData \\ Roaming \\ npm中删除Npm和npm-cache。 然后安装节点,它将确保正常工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.