当我执行 npm start 时出现此错误
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"
}
}
我也遇到过这个错误 also.This 是由于环境中的路径变量引起的。因此只需更改 unistall node.js 并从系统中删除路径变量,并从中删除 Npm 和 npm-cache AppData\Roaming\npm。然后安装节点它肯定会工作
我对此完全陌生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"
}
}
我也遇到过这个错误 also.This 是由于环境中的路径变量引起的。因此只需更改 unistall node.js 并从系统中删除路径变量,并从中删除 Npm 和 npm-cache AppData\Roaming\npm。然后安装节点它肯定会工作