当我尝试在heroku上部署react-app时,它向我发送了以下应用程序heroku日志: 它在本地运行,但不在heroku上运行
State changed from starting to crashed
2020-05-15T11:25:55.816804+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sakaar.herokuapp.com request_id=08accafa-0117-4e4d-a1b9-8538776d1640 fwd="27.34.50.89" dyno= connect= service= status=503 bytes= protocol=https
2020-05-15T11:27:58.085863+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sakaar.herokuapp.com request_id=67f628ce-e6fe-41a5-803b-9f357854f8ba fwd="27.34.50.89" dyno= connect= service= status=503 bytes= protocol=https
2020-05-15T11:28:03.720923+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=sakaar.herokuapp.com request_id=8774160d-883e-4287-9a5d-1a50bbb22937 fwd="27.34.50.89" dyno= connect= service= status=503 bytes= protocol=https
2020-05-15T11:28:19.056335+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/postjob" host=sakaar.herokuapp.com request_id=66263e38-de26-4039-8061-90f60f2828bc fwd="27.34.50.89" dyno= connect= service= status=503 bytes= protocol=https
请帮助我在heroku上部署此react-app。让我知道您是否需要任何东西。
答案 0 :(得分:0)
此article表明您仅需几行在两分钟内创建并部署React应用
您可以开始在Heroku上免费构建React应用。
npm install -g create-react-app
create-react-app my-app
cd my-app
git init
heroku create -b https://github.com/mars/create-react-app-buildpack.git
git add .
git commit -m "react-create-app on Heroku"
git push heroku master
heroku open