当我推送到Heroku时,出现以下错误。 -该页面无法加载,因此当我启动heroku logs --tail时;我在下面得到以下代码。现在,问题是,如果目前无法正常工作,我将无能为力。我已经对现有扩展进行了修改,但是这些修改在本地测试时有效,因此问题必须出在其他方面。
2019-03-08T14:32:50.166539+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2019-03-08T14:33:59.394888+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=forge-arc.herokuapp.com request_id=74fe5a1d-d2d5-442c-a3de-1c9ee014e975 fwd="194.196.127.82" dyno= connect= service= status=503 bytes= protocol=https
2019-03-08T14:38:48.490737+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=forge-arc.herokuapp.com request_id=f1725df5-6dc8-4b1b-9d56-f454e5b208bf fwd="194.196.127.82" dyno= connect= service= status=503 bytes= protocol=https
2019-03-08T14:46:28.000000+00:00 app[api]: Build started by user salazar.riva@protonmail.com
2019-03-08T14:47:53.061806+00:00 app[api]: Release v4 created by user salazar.riva@protonmail.com
2019-03-08T14:47:53.061806+00:00 app[api]: Deploy 7966b4d8 by user salazar.riva@protonmail.com
2019-03-08T14:47:54.423439+00:00 heroku[web.1]: State changed from crashed to starting
2019-03-08T14:47:58.756355+00:00 heroku[web.1]: Starting process with command `npm start`
2019-03-08T14:48:01.251642+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-08T14:48:01.233805+00:00 heroku[web.1]: Process exited with status 1
2019-03-08T14:48:01.086307+00:00 app[web.1]:
2019-03-08T14:48:01.086322+00:00 app[web.1]: > forge-rcdb@4.0.0 start /app
2019-03-08T14:48:01.086324+00:00 app[web.1]: > node bin/start.js
2019-03-08T14:48:01.086325+00:00 app[web.1]:
2019-03-08T14:48:01.167512+00:00 app[web.1]: internal/modules/cjs/loader.js:651
2019-03-08T14:48:01.167516+00:00 app[web.1]: throw err;
2019-03-08T14:48:01.167517+00:00 app[web.1]: ^
2019-03-08T14:48:01.167518+00:00 app[web.1]:
2019-03-08T14:48:01.167519+00:00 app[web.1]: Error: Cannot find module './static'
2019-03-08T14:48:01.167521+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
2019-03-08T14:48:01.167522+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:575:25)
2019-03-08T14:48:01.167524+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:705:19)
2019-03-08T14:48:01.167525+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:14:16)
2019-03-08T14:48:01.167527+00:00 app[web.1]: at Object.<anonymous> (/app/bin/start.js:15:3)
2019-03-08T14:48:01.167528+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:799:30)
2019-03-08T14:48:01.167529+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
2019-03-08T14:48:01.167530+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:666:32)
2019-03-08T14:48:01.167532+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
2019-03-08T14:48:01.167533+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:598:3)
2019-03-08T14:48:01.172782+00:00 app[web.1]:
2019-03-08T14:48:01.181772+00:00 app[web.1]: npm ERR! Linux 4.4.0-1038-aws
2019-03-08T14:48:01.181932+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2019-03-08T14:48:01.182077+00:00 app[web.1]: npm ERR! node v11.11.0
2019-03-08T14:48:01.182200+00:00 app[web.1]: npm ERR! npm v3.10.10
2019-03-08T14:48:01.182333+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-03-08T14:48:01.182443+00:00 app[web.1]: npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
2019-03-08T14:48:01.182522+00:00 app[web.1]: npm ERR! Exit status 1
2019-03-08T14:48:01.182619+00:00 app[web.1]: npm ERR!
2019-03-08T14:48:01.182710+00:00 app[web.1]: npm ERR! Failed at the forge-rcdb@4.0.0 start script 'node bin/start.js'.
2019-03-08T14:48:01.182800+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2019-03-08T14:48:01.182891+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the forge-rcdb package,
2019-03-08T14:48:01.182981+00:00 app[web.1]: npm ERR! not with npm itself.
2019-03-08T14:48:01.183077+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2019-03-08T14:48:01.183162+00:00 app[web.1]: npm ERR! node bin/start.js
2019-03-08T14:48:01.183252+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2019-03-08T14:48:01.183343+00:00 app[web.1]: npm ERR! npm bugs forge-rcdb
2019-03-08T14:48:01.183436+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2019-03-08T14:48:01.183525+00:00 app[web.1]: npm ERR! npm owner ls forge-rcdb
2019-03-08T14:48:01.183616+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2019-03-08T14:48:01.187629+00:00 app[web.1]:
2019-03-08T14:48:01.187773+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2019-03-08T14:48:01.187857+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2019-03-08T14:48:01.327292+00:00 heroku[web.1]: State changed from crashed to starting
2019-03-08T14:48:05.570034+00:00 heroku[web.1]: Starting process with command `npm start`
2019-03-08T14:48:07.840573+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-08T14:48:07.817098+00:00 heroku[web.1]: Process exited with status 1
2019-03-08T14:48:07.651138+00:00 app[web.1]:
2019-03-08T14:48:07.651153+00:00 app[web.1]: > forge-rcdb@4.0.0 start /app
2019-03-08T14:48:07.651155+00:00 app[web.1]: > node bin/start.js
2019-03-08T14:48:07.651156+00:00 app[web.1]:
2019-03-08T14:48:07.724604+00:00 app[web.1]: internal/modules/cjs/loader.js:651
2019-03-08T14:48:07.724608+00:00 app[web.1]: throw err;
2019-03-08T14:48:07.724609+00:00 app[web.1]: ^
2019-03-08T14:48:07.724611+00:00 app[web.1]:
2019-03-08T14:48:07.724612+00:00 app[web.1]: Error: Cannot find module './static'
2019-03-08T14:48:07.724614+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:649:15)
2019-03-08T14:48:07.724615+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:575:25)
2019-03-08T14:48:07.724617+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:705:19)
2019-03-08T14:48:07.724618+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:14:16)
2019-03-08T14:48:07.724619+00:00 app[web.1]: at Object.<anonymous> (/app/bin/start.js:15:3)
2019-03-08T14:48:07.724621+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:799:30)
2019-03-08T14:48:07.724622+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
2019-03-08T14:48:07.724623+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:666:32)
2019-03-08T14:48:07.724625+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:606:12)
2019-03-08T14:48:07.724626+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:598:3)
2019-03-08T14:48:07.729882+00:00 app[web.1]:
2019-03-08T14:48:07.735943+00:00 app[web.1]: npm ERR! Linux 4.4.0-1038-aws
2019-03-08T14:48:07.736108+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2019-03-08T14:48:07.736247+00:00 app[web.1]: npm ERR! node v11.11.0
2019-03-08T14:48:07.736365+00:00 app[web.1]: npm ERR! npm v3.10.10
2019-03-08T14:48:07.736491+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-03-08T14:48:07.736595+00:00 app[web.1]: npm ERR! forge-rcdb@4.0.0 start: `node bin/start.js`
2019-03-08T14:48:07.736684+00:00 app[web.1]: npm ERR! Exit status 1
2019-03-08T14:48:07.736783+00:00 app[web.1]: npm ERR!
2019-03-08T14:48:07.736871+00:00 app[web.1]: npm ERR! Failed at the forge-rcdb@4.0.0 start script 'node bin/start.js'.
2019-03-08T14:48:07.736960+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2019-03-08T14:48:07.737050+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the forge-rcdb package,
2019-03-08T14:48:07.737142+00:00 app[web.1]: npm ERR! not with npm itself.
2019-03-08T14:48:07.737231+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2019-03-08T14:48:07.737320+00:00 app[web.1]: npm ERR! node bin/start.js
2019-03-08T14:48:07.737412+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2019-03-08T14:48:07.737499+00:00 app[web.1]: npm ERR! npm bugs forge-rcdb
2019-03-08T14:48:07.737592+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2019-03-08T14:48:07.737675+00:00 app[web.1]: npm ERR! npm owner ls forge-rcdb
2019-03-08T14:48:07.737763+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2019-03-08T14:48:07.741834+00:00 app[web.1]:
2019-03-08T14:48:07.742043+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2019-03-08T14:48:07.742155+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2019-03-08T14:48:07.000000+00:00 app[api]: Build succeeded
2019-03-08T14:51:17.175542+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=forge-arc.herokuapp.com request_id=c3f21b41-7e75-417f-9419-107ceeeaaf92 fwd="194.196.127.82" dyno= connect= service= status=503 bytes= protocol=https
能帮我个忙吗?我可以看到错误出在节点bin / start.js,但这没有任何意义。该部分未更改。
答案 0 :(得分:0)
自述文件中的原始构建命令缺少构建服务器的位-可以在构建命令中添加以下内容以解决此问题:
npm run build-server && npm run build-prod && NODE_ENV=production npm start
有关详细信息,请参阅我的PR here。