对于我的应用程序,我将Postgres数据库部署到AWS,将服务器(节点和Express)和客户端(React)分别部署到Heroku。我的客户端应用程序一直崩溃,但我不确定为什么。在本地运行时一切正常。
2020-05-01T17:18:33.292129+00:00 app[web.1]: > jepurdy@0.1.0 start /app
2020-05-01T17:18:33.292130+00:00 app[web.1]: > react-scripts start
2020-05-01T17:18:33.292130+00:00 app[web.1]:
2020-05-01T17:18:36.464174+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.97.46/
2020-05-01T17:18:36.464711+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-05-01T17:18:36.464811+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-05-01T17:18:36.464902+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-05-01T17:18:36.465139+00:00 app[web.1]: Starting the development server...
2020-05-01T17:18:36.465140+00:00 app[web.1]:
2020-05-01T17:18:36.613427+00:00 heroku[web.1]: State changed from starting to crashed
2020-05-01T17:18:37.853487+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=jepurdy.herokuapp.com request_id=01b14ed3-4b6c-44e1-a2c9-7cfbd728b7ad fwd="75.155.134.45" dyno= connect= service= status=503 bytes= protocol=https
2020-05-01T17:18:38.248004+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=jepurdy.herokuapp.com request_id=a3519a2e-1ef9-49be-baa4-d4ed19f9d833 fwd="75.155.134.45" dyno= connect= service= status=503 bytes= protocol=https
这是客户端的package.json:
{
"name": "jepurdy",
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.9.7",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"axios": "^0.19.2",
"node-sass": "^4.14.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "^5.1.2",
"react-scripts": "3.4.1",
"react-spinners-css": "^1.1.7",
"socket.io": "^2.3.0",
"socket.io-client": "^2.3.0"
},
"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"
]
},
"proxy": "http://localhost:8080"
}