npm 开始在 node.js 中出错 [英] npm start giving error in node.js
问题描述
我对 node.js 和 mongodb 完全陌生.我正在使用以下链接:http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/这个过程工作得很好,得到了完全相同的结果.但突然间npm start"停止工作.我卸载了所有东西并尝试从本教程中给出的第 1 步重新安装.当我发出命令npm install -g express"时,我没有得到任何 http 304 和 GETS 列表!!.当我忽略并继续该过程时,我给出了命令 npm start ,但它不起作用.显示的错误如下所示C:\project\nodetest1>npm start
i am totally new to node.js and mongodb. I am using the following link: http://cwbuecheler.com/web/tutorials/2013/node-express-mongo/ This procedure worked very fine and got the exact same results. But all of a sudden "npm start" stopped working. I uninstalled every thing and trying to re-install from step 1 given in this tutorial. when i give the command "npm install -g express" i am not getting any list of http 304's and GETS!! . As i ignore and continue the procedure, i give the command npm start , but it does not work. the error displayed is shown below 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\\nodejs\\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:\\ProgramFiles\\nodejs\\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
请帮忙.提前致谢.
推荐答案
删除 node_modules 文件夹.运行 npm install
然后,重新运行你的命令 npm start
Delete the node_modules folder.
Run npm install
And then, re-run your command npm start
这篇关于npm 开始在 node.js 中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!