我正在嘗試使用 node.js 在 Heroku 上部署我的應用程式。應用程式在我的本地運行良好,但是當我嘗試在 Heroku 上部署它時出現以下錯誤:
2022-03-13T00:12:16.474210 00:00 heroku[web.1]: Starting process with command `bin/boot`
2022-03-13T00:12:17.528943 00:00 app[web.1]: bash: bin/boot: No such file or directory
2022-03-13T00:12:17.679770 00:00 heroku[web.1]: Process exited with status 127
2022-03-13T00:12:17.738233 00:00 heroku[web.1]: State changed from starting to crashed
2022-03-13T00:13:07.280433 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sopra-fs22-gulec-egeonu-client.herokuapp.com request_id=73dc7825-de2b-4a24-bf3f-4d7bfe67ec60 fwd="213.55.224.62" dyno= connect= service= status=503 bytes= protocol=https
2022-03-13T00:13:07.460574 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sopra-fs22-gulec-egeonu-client.herokuapp.com request_id=d29010bf-9c0b-4e27-b902-9540d393f667 fwd="213.55.224.62" dyno= connect= service= status=503 bytes= protocol=https
2022-03-13T00:13:41.656858 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sopra-fs22-gulec-egeonu-client.herokuapp.com request_id=91ecbc00-ee15-4eed-bbfd-c3d3af522548 fwd="213.55.224.62" dyno= connect= service= status=503 bytes= protocol=https
2022-03-13T00:13:41.867824 00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=sopra-fs22-gulec-egeonu-client.herokuapp.com request_id=cfd378e9-ab85-46a3-b636-3e4fac1140ad fwd="213.55.224.62" dyno= connect= service= status=503 bytes= protocol=https
我的簡介是這樣的:
web: bin/boot
和 package.json
{
"name": "sopra-fs22-client-template",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.24.0",
"moment": "^2.29.1",
"node-gyp": "^8.4.1",
"node-sass": "^7.0.1",
"react": "^17.0.2",
"react-datetime-picker": "^3.5.0",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
"react-scripts": "^5.0.0",
"styled-components": "^5.3.3"
},
"scripts": {
"dev": "react-scripts start",
"start": "serve -s build",
"build": "react-scripts build",
"eject": "react-scripts eject",
"test": "react-scripts test --env=jsdom",
"heroku-postbuild": "npm run build"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
我還檢查了其他帖子并嘗試了其他事情,但我不知道在哪里可以檢查非常感謝。
uj5u.com熱心網友回復:
嘗試將您的 Procfile 更改為此
web: npm run start
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/442617.html
