Heroku在部署时出现应用程序错误

时间:2020-03-26 09:12:43

标签: reactjs heroku

嗨,我正在尝试在heroku上部署React应用,但是它再次失败,并显示以下日志错误

D:\Development(s)\Project(s)\test\react\my-deals>heroku logs
2020-03-25T18:44:59.676262+00:00 app[web.1]:
2020-03-25T18:44:59.676285+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-25T18:44:59.676285+00:00 app[web.1]: > react-scripts start
2020-03-25T18:44:59.676285+00:00 app[web.1]:
2020-03-25T18:45:04.560366+00:00 app[web.1]: ℹ 「wds」: Project is running at http://192.168.0.0/
2020-03-25T18:45:04.561333+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-25T18:45:04.561534+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-25T18:45:04.561719+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-25T18:45:04.562050+00:00 app[web.1]: Starting the development server...
2020-03-25T18:45:04.562051+00:00 app[web.1]:
2020-03-25T18:45:04.750436+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-25T18:45:04.727177+00:00 heroku[web.1]: Process exited with status 0
2020-03-25T19:24:53.138153+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-25T19:25:02.869798+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-25T19:25:04.798632+00:00 app[web.1]:
2020-03-25T19:25:04.798648+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-25T19:25:04.798648+00:00 app[web.1]: > react-scripts start
2020-03-25T19:25:04.798649+00:00 app[web.1]:
2020-03-25T19:25:06.939005+00:00 heroku[web.1]: Process exited with status 0
2020-03-25T19:25:06.873095+00:00 app[web.1]: ℹ 「wds」: Project is running at http://192.168.0.0/
2020-03-25T19:25:06.873474+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-25T19:25:06.873551+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-25T19:25:06.873618+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-25T19:25:06.873799+00:00 app[web.1]: Starting the development server...
2020-03-25T19:25:06.873800+00:00 app[web.1]:
2020-03-25T19:25:06.958787+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-25T20:47:09.049727+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-25T20:47:22.469365+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-25T20:47:25.709699+00:00 app[web.1]:
2020-03-25T20:47:25.709782+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-25T20:47:25.709783+00:00 app[web.1]: > react-scripts start
2020-03-25T20:47:25.709783+00:00 app[web.1]:
2020-03-25T20:47:29.814595+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.232.202/
2020-03-25T20:47:29.815432+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-25T20:47:29.815652+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-25T20:47:29.815868+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-25T20:47:29.816362+00:00 app[web.1]: Starting the development server...
2020-03-25T20:47:29.816364+00:00 app[web.1]:
2020-03-25T20:47:29.979498+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-25T20:47:29.960262+00:00 heroku[web.1]: Process exited with status 0
2020-03-25T23:28:48.198167+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-25T23:28:58.896140+00:00 app[web.1]:
2020-03-25T23:28:58.896151+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-25T23:28:58.896151+00:00 app[web.1]: > react-scripts start
2020-03-25T23:28:58.896152+00:00 app[web.1]:
2020-03-25T23:29:00.752602+00:00 app[web.1]: ℹ 「wds」: Project is running at http://192.168.0.0/
2020-03-25T23:29:00.752973+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-25T23:29:00.753052+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-25T23:29:00.753107+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-25T23:29:00.753270+00:00 app[web.1]: Starting the development server...
2020-03-25T23:29:00.753270+00:00 app[web.1]:
2020-03-25T23:29:00.837797+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-26T05:16:03.514668+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-26T05:16:12.443244+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-26T05:16:14.553805+00:00 app[web.1]:
2020-03-26T05:16:14.553835+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-26T05:16:14.553836+00:00 app[web.1]: > react-scripts start
2020-03-26T05:16:14.553836+00:00 app[web.1]:
2020-03-26T05:16:16.659959+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.129.150/
2020-03-26T05:16:16.660511+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-26T05:16:16.660639+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-26T05:16:16.660775+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-26T05:16:16.661053+00:00 app[web.1]: Starting the development server...
2020-03-26T05:16:16.661055+00:00 app[web.1]:
2020-03-26T05:16:16.757402+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-26T05:16:16.741677+00:00 heroku[web.1]: Process exited with status 0
2020-03-26T09:02:34.000000+00:00 app[api]: Build started by user user@gmail.com
2020-03-26T09:04:00.407386+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-26T09:04:00.194421+00:00 app[api]: Deploy 2967ce58 by user user@gmail.com
2020-03-26T09:04:00.194421+00:00 app[api]: Release v4 created by user user@gmail.com
2020-03-26T09:04:07.000000+00:00 app[api]: Build succeeded
2020-03-26T09:04:11.099585+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-26T09:04:13.569067+00:00 app[web.1]:
2020-03-26T09:04:13.569091+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-26T09:04:13.569092+00:00 app[web.1]: > react-scripts start
2020-03-26T09:04:13.569092+00:00 app[web.1]:
2020-03-26T09:04:16.107640+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.19.9.138/
2020-03-26T09:04:16.108251+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-26T09:04:16.108326+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-26T09:04:16.110152+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-26T09:04:16.110435+00:00 app[web.1]: Starting the development server...
2020-03-26T09:04:16.110436+00:00 app[web.1]:
2020-03-26T09:04:16.274068+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-26T09:04:16.278245+00:00 heroku[web.1]: State changed from crashed to starting
2020-03-26T09:04:16.252987+00:00 heroku[web.1]: Process exited with status 0
2020-03-26T09:04:25.321693+00:00 heroku[web.1]: Starting process with command `npm start`
2020-03-26T09:04:28.085852+00:00 app[web.1]:
2020-03-26T09:04:28.085875+00:00 app[web.1]: > my-deals@0.1.0 start /app
2020-03-26T09:04:28.085875+00:00 app[web.1]: > react-scripts start
2020-03-26T09:04:28.085876+00:00 app[web.1]:
2020-03-26T09:04:31.529297+00:00 app[web.1]: ℹ 「wds」: Project is running at http://192.168.0.0/
2020-03-26T09:04:31.529899+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-03-26T09:04:31.530000+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-03-26T09:04:31.530093+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-03-26T09:04:31.530293+00:00 app[web.1]: Starting the development server...
2020-03-26T09:04:31.530294+00:00 app[web.1]:
2020-03-26T09:04:31.647095+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-26T09:04:31.628545+00:00 heroku[web.1]: Process exited with status 0
2020-03-26T09:04:32.905992+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=itss-cms.herokuapp.com request_id=0db25d36-49d7-420b-80c8-94a29c2edb64 fwd="192.298.109.1" dyno= connect= service= status=503 bytes= protocol=https
2020-03-26T09:04:34.467671+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=itss-cms.herokuapp.com request_id=4a395308-e694-4d27-a0be-e7934d3a0cc7 fwd="192.298.109.1" dyno= connect= service= status=503 bytes= protocol=https

下面是我的package.json文件

{
"name": "my-deals",
"root": "src/",
"version": "0.1.0",
"private": true,
"dependencies": {
  "@testing-library/jest-dom": "^4.2.4",
  "@testing-library/react": "^9.5.0",
  "@testing-library/user-event": "^7.2.1",
  "express": "^4.17.1",
  "react": "^16.13.1",
  "react-dom": "^16.13.1",
  "react-router-dom": "^5.1.2",
  "react-scripts": "3.4.1"
},
"engines": {
  "node": "13.6.0",
  "npm": "6.13.4"
},
"scripts": {
  "start": "react-scripts start",
  "build": "react-scripts build",
  "test": "react-scripts test",
  "eject": "react-scripts eject"
},
"eslintConfig": {
  "extends": "react-app"
},
"browserslist": {
  "production": [
    ">0.2%",
    "not dead",
    "not op_mini all"
  ],
  "development": [
    "last 1 chrome version",
    "last 1 firefox version",
    "last 1 safari version"
  ]
}

}

我做错了什么?

0 个答案:

没有答案