heroku部署失败

时间:2020-04-10 04:47:37

标签: node.js heroku npm

每当我尝试使用heroku运行Discord机器人时,都会出现以下错误

2020-04-10T03:58:57.537976+00:00 app[web.1]: > node index.js
2020-04-10T03:58:57.537977+00:00 app[web.1]: 
2020-04-10T03:58:57.611547+00:00 app[web.1]: internal/modules/cjs/loader.js:895
2020-04-10T03:58:57.611549+00:00 app[web.1]:     throw err;
2020-04-10T03:58:57.611549+00:00 app[web.1]:     ^
2020-04-10T03:58:57.611549+00:00 app[web.1]: 
2020-04-10T03:58:57.611550+00:00 app[web.1]: Error: Cannot find module '/app/index.js'
2020-04-10T03:58:57.611550+00:00 app[web.1]:     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:892:15)
2020-04-10T03:58:57.611551+00:00 app[web.1]:     at Function.Module._load (internal/modules/cjs/loader.js:785:27)
2020-04-10T03:58:57.611551+00:00 app[web.1]:     at Function.Module.runMain (internal/modules/cjs/loader.js:1143:12)
2020-04-10T03:58:57.611552+00:00 app[web.1]:     at internal/main/run_main_module.js:16:11 {
2020-04-10T03:58:57.611552+00:00 app[web.1]:   code: 'MODULE_NOT_FOUND',
2020-04-10T03:58:57.611552+00:00 app[web.1]:   requireStack: []
2020-04-10T03:58:57.611553+00:00 app[web.1]: }
2020-04-10T03:58:57.630382+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-04-10T03:58:57.631009+00:00 app[web.1]: npm ERR! errno 1
2020-04-10T03:58:57.634674+00:00 app[web.1]: npm ERR! thegreatdiscorddanddbotproject@1.0.0 start: `node index.js`
2020-04-10T03:58:57.635059+00:00 app[web.1]: npm ERR! Exit status 1
2020-04-10T03:58:57.635469+00:00 app[web.1]: npm ERR! 
2020-04-10T03:58:57.635883+00:00 app[web.1]: npm ERR! Failed at the thegreatdiscorddanddbotproject@1.0.0 start script.
2020-04-10T03:58:57.636232+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-04-10T03:58:57.655231+00:00 app[web.1]: 
2020-04-10T03:58:57.662583+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-04-10T03:58:57.662832+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-04-10T03_58_57_637Z-debug.log

ive尝试重新提交文件,并创建一个实际路径,但是没有任何效果,我已经确认索引文件在其中,并且小写,我不知道如何继续

0 个答案:

没有答案