启动一个node程序,首先npm install,然后npm start,可出现了如下问题:
E:\nodejs\gnss-seed-master>npm start
> gateway@0.0.0 start E:\nodejs\gnss-seed-master
> node ./bin/www
module.js:327
throw err;
^
Error: Cannot find module 'E:\nodejs\gnss-seed-master\bin\www'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
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" "start"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! gateway@0.0.0 start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gateway@0.0.0 start script 'node ./bin/www'.
npm ERR! This is most likely a problem with the gateway 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 information on how to open an issue for this project with:
npm ERR! npm bugs gateway
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls gateway
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\nodejs\gnss-seed-master\npm-debug.log
查询了修改方法,有一种是:
npm install cheerio@^0.19.0
重新安装cheerio,并指定版本
但是试过没有效果,请大神们指点!!
好像是gateway這個包出問題了,試試 npm rebuild gateway
我覺得是你的 bin/www 下面沒有 index.js 呢