我正在尝试使用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"
]
}
我也检查了其他职位,并尝试了其他事情,以及,但我不知道在其他地方检查非常感谢。
2条答案
按热度按时间wb1gzix01#
请尝试将您的Procfile更改为
gcuhipw92#
我已经删除了节点模块,并从package-lock.json复制了依赖项,然后将其粘贴到package.json中
我发现nodemon不在依赖项部分,然后我补充道:“开始”:“nodemon index.js”,在脚本中,npm i,再次部署它,它工作了!