node.js - nodejs npm start后出现错误module.js:327 throw err;?

 赢在青春创业团队 发布于 2022-11-02 08:38

启动一个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?1.2.1" "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 个回答
  • 我觉得是你的 bin/www 下面没有 index.js 呢

    2022-11-12 01:54 回答
  • 好像是gateway这个包出问题了,试下 npm rebuild gateway

    2022-11-12 01:54 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有