搜索
node.js - nodejs npm start后出现错误module.js:327 throw err;?
巴扎黑
巴扎黑 2017-04-17 14:43:00
[Node.js讨论组]

启动一个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,并指定版本
但是试过没有效果,请大神们指点!!

巴扎黑
巴扎黑

全部回复(2)
怪我咯

好像是gateway这个包出问题了,试下 npm rebuild gateway

PHP中文网

我觉得是你的 bin/www 下面没有 index.js 呢

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号