简体   繁体   中英

React App Crashes When Deployed to Heroku

I just deployed my React app to Heroku and while the deployment was successful, the ap crashes and I get an Application Error on the screen. I ran Heroku Logs and it returned this error:

at=error code=H10 desc="App crashed" method=GET path="/" host=quoriron-
client-app.herokuapp.com request_id=fe82d878-75ce-47b2-a726-
513725e679f2 fwd="65.209.61.114" dyno= connect= service= status=503 
bytes= protocol=https

Other people have had that error with Node apps and it's seems to usually be an issue with setting the port, but from my understanding the port isn't set the same way in React (or if that's even the problem).

How can I prevent my React app from crashing because of this error?

First sorry for reply this as an answer while it should be a comment...

How did you deploy the React app to Heroku?? Did you use their zero configuration for React apps or did you created your own Node.js that serve the react app?

Also you'll need to add the correctly buildpack to the project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM