在Heroku中部署Framework7应用程序时,如何解决“错误R10(启动超时)”?

时间:2019-09-13 02:32:27

标签: node.js heroku webpack html-framework-7

我正在构建Framework7应用程序,并希望将其部署在heroku中以便提交功课。我遵循了使用Heroku CLI在Heroku Deploy中给出的步骤。它可以成功编译并正确构建,但是我遇到了上述错误。

下面是日志:



    2019-09-13T02:11:50.997471+00:00 heroku[web.1]: Starting process with command `npm start`
    2019-09-13T02:11:51.000000+00:00 app[api]: Build succeeded
    2019-09-13T02:11:53.328087+00:00 app[web.1]:
    2019-09-13T02:11:53.328110+00:00 app[web.1]: > bus-ar@1.0.0 start /app
    2019-09-13T02:11:53.328111+00:00 app[web.1]: > npm run dev
    2019-09-13T02:11:53.328113+00:00 app[web.1]:
    2019-09-13T02:11:53.854346+00:00 app[web.1]:
    2019-09-13T02:11:53.854374+00:00 app[web.1]: > bus-ar@1.0.0 dev /app
    2019-09-13T02:11:53.854377+00:00 app[web.1]: > cross-env NODE_ENV=development webpack-dev-server --config ./build/webpack.config.js
    2019-09-13T02:11:53.854379+00:00 app[web.1]:
    2019-09-13T02:11:56.426292+00:00 app[web.1]: ℹ 「wds」: Project is running at http://localhost:8080/
    2019-09-13T02:11:56.427099+00:00 app[web.1]: ℹ 「wds」: webpack output is served from /
    2019-09-13T02:11:56.427248+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /www/
    2019-09-13T02:12:17.535441+00:00 app[web.1]: ℹ 「wdm」: Hash: 0751dcdbf7b4af204339
    2019-09-13T02:12:17.535467+00:00 app[web.1]: Version: webpack 4.39.3
    2019-09-13T02:12:17.535470+00:00 app[web.1]: Time: 21103ms
    2019-09-13T02:12:17.535472+00:00 app[web.1]: Built at: 09/13/2019 2:12:17 AM
    2019-09-13T02:12:17.535477+00:00 app[web.1]: Asset      Size  Chunks             Chunk Names
    2019-09-13T02:12:17.535479+00:00 app[web.1]: ./index.html  6.26 KiB          [emitted]
    2019-09-13T02:12:17.535481+00:00 app[web.1]: fonts/Framework7Icons-Regular.eot    88 KiB          [emitted]
    2019-09-13T02:12:17.535483+00:00 app[web.1]: fonts/Framework7Icons-Regular.ttf  87.8 KiB          [emitted]
    2019-09-13T02:12:17.535484+00:00 app[web.1]: fonts/Framework7Icons-Regular.woff  43.4 KiB          [emitted]
    2019-09-13T02:12:17.535486+00:00 app[web.1]: fonts/Framework7Icons-Regular.woff2    34 KiB          [emitted]
    2019-09-13T02:12:17.535488+00:00 app[web.1]: fonts/MaterialIcons-Regular.eot   140 KiB          [emitted]
    2019-09-13T02:12:17.535491+00:00 app[web.1]: fonts/MaterialIcons-Regular.ttf   125 KiB          [emitted]
    2019-09-13T02:12:17.535493+00:00 app[web.1]: fonts/MaterialIcons-Regular.woff  56.3 KiB          [emitted]
    2019-09-13T02:12:17.535495+00:00 app[web.1]: fonts/MaterialIcons-Regular.woff2  43.3 KiB          [emitted]
    2019-09-13T02:12:17.535497+00:00 app[web.1]: js/app.js  2.87 MiB    main  [emitted]  main
    2019-09-13T02:12:17.535499+00:00 app[web.1]: static/icons/128x128.png  17.4 KiB          [emitted]
    2019-09-13T02:12:17.535501+00:00 app[web.1]: static/icons/144x144.png  20.9 KiB          [emitted]
    2019-09-13T02:12:17.535504+00:00 app[web.1]: static/icons/152x152.png  22.9 KiB          [emitted]
    2019-09-13T02:12:17.535506+00:00 app[web.1]: static/icons/192x192.png  32.7 KiB          [emitted]
    2019-09-13T02:12:17.535508+00:00 app[web.1]: static/icons/256x256.png  52.3 KiB          [emitted]
    2019-09-13T02:12:17.535510+00:00 app[web.1]: static/icons/512x512.png   169 KiB          [emitted]
    2019-09-13T02:12:17.535512+00:00 app[web.1]: static/icons/apple-touch-icon.png  69.8 KiB          [emitted]
    2019-09-13T02:12:17.535514+00:00 app[web.1]: static/icons/favicon.png  36.3 KiB          [emitted]
    2019-09-13T02:12:17.535516+00:00 app[web.1]: Entrypoint main = js/app.js
    2019-09-13T02:12:17.535529+00:00 app[web.1]: [1] multi (webpack)-dev-server/client?http://localhost:8080 (webpack)/hot/dev-server.js ./src/js/app.js 52 bytes {main} [built]
    2019-09-13T02:12:17.535532+00:00 app[web.1]: [./node_modules/dom7/dist/dom7.module.js] 45.4 KiB {main} [built]
    2019-09-13T02:12:17.535534+00:00 app[web.1]: [./node_modules/framework7/css/framework7.bundle.css] 963 bytes {main} [built]
    2019-09-13T02:12:17.535536+00:00 app[web.1]: [./node_modules/framework7/framework7.esm.bundle.js] 5.69 KiB {main} [built]
    2019-09-13T02:12:17.535538+00:00 app[web.1]: [./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
    2019-09-13T02:12:17.535543+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/index.js?http://localhost:8080] (webpack)-dev-server/client?http://localhost:8080 4.29 KiB {main} [built]
    2019-09-13T02:12:17.535545+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
    2019-09-13T02:12:17.535547+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
    2019-09-13T02:12:17.535549+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.85 KiB {main} [built]
    2019-09-13T02:12:17.535551+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
    2019-09-13T02:12:17.535556+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built]
    2019-09-13T02:12:17.535558+00:00 app[web.1]: [./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
    2019-09-13T02:12:17.535563+00:00 app[web.1]: [./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
    2019-09-13T02:12:17.535567+00:00 app[web.1]: [./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {main} [built]2019-09-13T02:12:17.535570+00:00 app[web.1]: [./src/js/app.js] 2.92 KiB {main} [built]
    2019-09-13T02:12:17.535572+00:00 app[web.1]: + 299 hidden modules
    2019-09-13T02:12:17.535574+00:00 app[web.1]: Child html-webpack-plugin for "index.html":
    2019-09-13T02:12:17.535576+00:00 app[web.1]: 1 asset
    2019-09-13T02:12:17.535579+00:00 app[web.1]: Entrypoint undefined = ./index.html
    2019-09-13T02:12:17.535581+00:00 app[web.1]: [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 6.57 KiB {0} [built]
    2019-09-13T02:12:17.535583+00:00 app[web.1]: [./node_modules/lodash/lodash.js] 528 KiB {0} [built]
    2019-09-13T02:12:17.535585+00:00 app[web.1]: [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
    2019-09-13T02:12:17.535587+00:00 app[web.1]: [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
    2019-09-13T02:12:17.535687+00:00 app[web.1]: ℹ 「wdm」: Compiled successfully.
    2019-09-13T02:12:51.301903+00:00 heroku[web.1]: State changed from starting to crashed
    2019-09-13T02:12:51.201734+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch2019-09-13T02:12:51.201792+00:00 heroku[web.1]: Stopping process with SIGKILL
    2019-09-13T02:12:51.284740+00:00 heroku[web.1]: Process exited with status 137
    2019-09-13T02:12:52.535564+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bus-ar.herokuapp.com request_id=14d31193-7da1-4d2e-8811-4bf5f6799da2 fwd="202.57.49.249" dyno= connect= service= status=503 bytes= protocol=https
    2019-09-13T02:12:52.999604+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=bus-ar.herokuapp.com request_id=b6b0a4d9-fe21-4c85-ae85-95d7ed9c6a20 fwd="202.57.49.249" dyno= connect= service= status=503 bytes= protocol=https
    2019-09-13T02:12:53.467066+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bus-ar.herokuapp.com request_id=45e786ac-122e-4464-9f9c-6ed201c3d85f fwd="202.57.49.249" dyno= connect= service= status=503 bytes= protocol=https

我可以在本地构建它,但是我需要它在Heroku中运行才能成为讲师的视线。如何通过启动超时解决此问题?

0 个答案:

没有答案