Hin im kinda new to web development. I built a react website but i can't manage to deploy it on heroku.
package.json:
"scripts": {
"dev": "react-scripts start",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject",
"heroku-postbuild": "npm run build"
},
I have a Procfile next to my package.json with :
web:npm start
console throw this error when i do herolu logs --tail :
2020-04-25T09:16:16.142345+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vertikalreunion.herokuapp.com request_id=f7d41b53-de86-4b4d-83fb-994cab236581 fwd="82.64.226.67" dyno= connect= service= status=503 bytes= protocol=https
2020-04-25T09:16:27.595683+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T09:16:51.753401+00:00 app[web.1]:
2020-04-25T09:16:51.753423+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T09:16:51.753423+00:00 app[web.1]: > react-scripts start
2020-04-25T09:16:51.753423+00:00 app[web.1]:
2020-04-25T09:16:54.009357+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T09:16:53.900786+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.53.194/
2020-04-25T09:16:53.901127+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T09:16:53.901196+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T09:16:53.901262+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T09:16:53.901440+00:00 app[web.1]: Starting the development server...
2020-04-25T09:16:53.901458+00:00 app[web.1]:
2020-04-25T09:16:55.709712+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vertikalreunion.herokuapp.com request_id=09ca158b-97f3-4693-9393-cd06adf078f5 fwd="82.64.226.67" dyno= connect= service= status=503 bytes= protocol=https
2020-04-25T09:19:08.785514+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T09:19:30.469551+00:00 app[web.1]:
2020-04-25T09:19:30.469601+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T09:19:30.469602+00:00 app[web.1]: > react-scripts start
2020-04-25T09:19:30.469602+00:00 app[web.1]:
2020-04-25T09:19:32.893506+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T09:19:32.802075+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.19.5.2/
2020-04-25T09:19:32.802231+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T09:19:32.802333+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T09:19:32.802403+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T09:19:32.802595+00:00 app[web.1]: Starting the development server...
2020-04-25T09:19:32.802596+00:00 app[web.1]:
2020-04-25T09:41:17.364623+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T09:41:38.385042+00:00 app[web.1]:
2020-04-25T09:41:38.385060+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T09:41:38.385061+00:00 app[web.1]: > react-scripts start
2020-04-25T09:41:38.385061+00:00 app[web.1]:
2020-04-25T09:41:40.279176+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T09:41:40.184921+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.183.158/
2020-04-25T09:41:40.185258+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T09:41:40.185335+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T09:41:40.185406+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T09:41:40.185581+00:00 app[web.1]: Starting the development server...
2020-04-25T09:41:40.185582+00:00 app[web.1]:
2020-04-25T10:23:03.438472+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T10:23:25.751986+00:00 app[web.1]:
2020-04-25T10:23:25.752002+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T10:23:25.752002+00:00 app[web.1]: > react-scripts start
2020-04-25T10:23:25.752002+00:00 app[web.1]:
2020-04-25T10:23:28.152557+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T10:23:28.051089+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.19.226/
2020-04-25T10:23:28.051680+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T10:23:28.051715+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T10:23:28.051831+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T10:23:28.052068+00:00 app[web.1]: Starting the development server...
2020-04-25T10:23:28.052068+00:00 app[web.1]:
2020-04-25T11:42:46.689638+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vertikalreunion.herokuapp.com request_id=5ca84f44-a006-4deb-a61b-b288a3a04109 fwd="82.64.226.67" dyno= connect= service= status=503 bytes= protocol=https
2020-04-25T11:43:34.646592+00:00 app[api]: Starting process with command `printenv` by user velluetp#gmail.com
2020-04-25T11:43:52.591042+00:00 heroku[run.1701]: State changed from starting to up
2020-04-25T11:43:57.024009+00:00 heroku[run.1701]: State changed from up to complete
2020-04-25T11:46:45.991288+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T11:47:07.851528+00:00 app[web.1]:
2020-04-25T11:47:07.851557+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T11:47:07.851558+00:00 app[web.1]: > react-scripts start
2020-04-25T11:47:07.851558+00:00 app[web.1]:
2020-04-25T11:47:10.275055+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T11:47:10.153858+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.160.154/
2020-04-25T11:47:10.154471+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T11:47:10.154540+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T11:47:10.154659+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T11:47:10.154945+00:00 app[web.1]: Starting the development server...
2020-04-25T11:47:10.154946+00:00 app[web.1]:
2020-04-25T12:01:11.000000+00:00 app[api]: Build started by user velluetp#gmail.com
2020-04-25T12:01:57.000000+00:00 app[api]: Build failed -- check your build output: https://dashboard.heroku.com/apps/9c187c58-5551-4ceb-8b9b-bc3ef1e25101/activity/builds/69305220-a27f-436d-8841-9f17a17017e4
2020-04-25T12:11:22.000000+00:00 app[api]: Build started by user velluetp#gmail.com
2020-04-25T12:13:26.032267+00:00 app[api]: Deploy d028d641 by user velluetp#gmail.com
2020-04-25T12:13:26.032267+00:00 app[api]: Release v12 created by user velluetp#gmail.com
2020-04-25T12:13:27.646789+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T12:13:39.000000+00:00 app[api]: Build succeeded
2020-04-25T12:13:48.056119+00:00 app[web.1]:
2020-04-25T12:13:48.056133+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T12:13:48.056133+00:00 app[web.1]: > react-scripts start
2020-04-25T12:13:48.056134+00:00 app[web.1]:
2020-04-25T12:13:50.150679+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T12:13:50.228845+00:00 heroku[web.1]: State changed from crashed to starting
2020-04-25T12:13:50.028096+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.46.74/
2020-04-25T12:13:50.028436+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T12:13:50.028512+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T12:13:50.028579+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T12:13:50.028756+00:00 app[web.1]: Starting the development server...
2020-04-25T12:13:50.028757+00:00 app[web.1]:
2020-04-25T12:14:16.995981+00:00 app[web.1]:
2020-04-25T12:14:16.995997+00:00 app[web.1]: > vertikal#0.1.0 start /app
2020-04-25T12:14:16.995997+00:00 app[web.1]: > react-scripts start
2020-04-25T12:14:16.995998+00:00 app[web.1]:
2020-04-25T12:14:19.993371+00:00 heroku[web.1]: State changed from starting to crashed
2020-04-25T12:14:19.866235+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.253.118/
2020-04-25T12:14:19.866644+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-04-25T12:14:19.866749+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-04-25T12:14:19.866883+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-04-25T12:14:19.867083+00:00 app[web.1]: Starting the development server...
2020-04-25T12:14:19.867084+00:00 app[web.1]:
2020-04-25T12:14:22.011941+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vertikalreunion.herokuapp.com request_id=e69732b6-851b-46ca-9853-4a014a45f282 fwd="82.64.226.67" dyno= connect= service= status=503 bytes= protocol=https
2020-04-25T12:14:33.524773+00:00 app[api]: Starting process with command `rails console` by user velluetp#gmail.com
2020-04-25T12:14:54.113480+00:00 heroku[run.9122]: State changed from starting to up
2020-04-25T12:14:58.860885+00:00 heroku[run.9122]: State changed from up to complete
I have no idea where the problems comes from, even after hard-trying to find solution on the internet.
dont use to start scripts, remove "dev": "react-scripts start",
When using create-react-app and deploying to
dont delete the favicon.ico and manifest.json
also in package.json above scripts insert "engines": {
"npm": "6.x",
"node": "12.x"
},
//NOTE CHECK YOUR NODE AND NPM VERSIONS BY TYPING npm -v and node -v for accurate versions//
In heroku after heroku create command, go to heroku and change buildback under settings to https://github.com/mars/create-react-app-buildpack
Dont add other scripts or change the start, build scripts!
This should clear all h10 errors when deploying to heroku, if they dont i suggest you create a new directory and copy your files there and start over, this link is a great guide to deploy
https://dev.to/smithmanny/deploy-your-react-app-to-heroku-2b6f
Related
I just learnt Typescript and tried to push it to Heroku to run online. However, I got this problem. Can anyone help me what is wrong with the configuration? I already have a Profile with web: npm start.
{
"name": "my-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"#types/jest": "^24.9.1",
"#types/node": "^12.12.54",
"#types/react": "^16.9.46",
"#types/react-dom": "^16.9.8",
"#types/styled-components": "^5.1.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.3",
"styled-components": "^5.1.1",
"typescript": "^3.7.5"
},
"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"
]
}
}
When I tried to run it on heroku, these error shows up. Can anyone help me point out where I get wrong on the code? Thank you.
2020-08-20T02:04:52.768419+00:00 app[api]: Initial release by user kevxxxxx
2020-08-20T02:04:52.768419+00:00 app[api]: Release v1 created by user kevkxxxxx
2020-08-20T02:04:52.863227+00:00 app[api]: Enable Logplex by user kevkwxxxx
2020-08-20T02:04:52.863227+00:00 app[api]: Release v2 created by user kevkwxxxx
2020-08-20T02:05:02.000000+00:00 app[api]: Build started by user kevkwxxxx
2020-08-20T02:06:24.621179+00:00 app[api]: Release v3 created by user kevkwxxxx
2020-08-20T02:06:24.621179+00:00 app[api]: Deploy b542e4e6 by user kevkwxxxx
2020-08-20T02:06:24.637255+00:00 app[api]: Scaled to web#1:Free by user kevkwxxxx
2020-08-20T02:06:33.000000+00:00 app[api]: Build succeeded
2020-08-20T02:06:33.778274+00:00 heroku[web.1]: Starting process with command `npm start`
2020-08-20T02:06:37.345544+00:00 app[web.1]:
2020-08-20T02:06:37.345569+00:00 app[web.1]: > my-app#0.1.0 start /app
2020-08-20T02:06:37.345570+00:00 app[web.1]: > react-scripts start
2020-08-20T02:06:37.345570+00:00 app[web.1]:
2020-08-20T02:06:40.190225+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.1.122/
2020-08-20T02:06:40.190782+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-08-20T02:06:40.190901+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-08-20T02:06:40.191007+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-08-20T02:06:40.191239+00:00 app[web.1]: Starting the development server...
2020-08-20T02:06:40.191239+00:00 app[web.1]:
2020-08-20T02:06:40.320581+00:00 heroku[web.1]: Process exited with status 0
2020-08-20T02:06:40.357851+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-20T02:06:40.361139+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-20T02:06:48.334774+00:00 heroku[web.1]: Starting process with command `npm start`
2020-08-20T02:06:50.949971+00:00 app[web.1]:
2020-08-20T02:06:50.949997+00:00 app[web.1]: > my-app#0.1.0 start /app
2020-08-20T02:06:50.949997+00:00 app[web.1]: > react-scripts start
2020-08-20T02:06:50.949998+00:00 app[web.1]:
2020-08-20T02:06:53.410228+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.19.104.146/
2020-08-20T02:06:53.410751+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-08-20T02:06:53.410902+00:00 app[web.1]: ℹ ��wds」: Content not from webpack is served from /app/public
2020-08-20T02:06:53.411003+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-08-20T02:06:53.411229+00:00 app[web.1]: Starting the development server...
2020-08-20T02:06:53.411231+00:00 app[web.1]:
2020-08-20T02:06:53.535298+00:00 heroku[web.1]: Process exited with status 0
2020-08-20T02:06:53.573752+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-20T02:06:54.608604+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=guarded-depths-86821.herokuapp.com request_id=a715a5b6-5ebd-46a1-bc83-e5af1a8adf93 fwd="98.252.127.199" dyno= connect= service= status=503 bytes= protocol=https
2020-08-20T02:06:55.888464+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=guarded-depths-86821.herokuapp.com request_id=1c2e5980-a5b3-4a14-93b5-76ab3a8a4e1f fwd="98.252.127.199" dyno= connect= service= status=503 bytes= protocol=https
2020-08-20T02:15:00.000000+00:00 app[api]: Build started by user kevkwoxxxxx
2020-08-20T02:16:25.020488+00:00 app[api]: Deploy 96a06fc7 by user kevkwoxxxx
2020-08-20T02:16:25.020488+00:00 app[api]: Release v4 created by user kevkwxxxx
2020-08-20T02:16:25.756806+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-20T02:16:33.000000+00:00 app[api]: Build succeeded
2020-08-20T02:16:38.637718+00:00 heroku[web.1]: Starting process with command `npm start`
2020-08-20T02:16:44.452152+00:00 app[web.1]:
2020-08-20T02:16:44.452164+00:00 app[web.1]: > my-app#0.1.0 start /app
2020-08-20T02:16:44.452164+00:00 app[web.1]: > react-scripts start
2020-08-20T02:16:44.452164+00:00 app[web.1]:
2020-08-20T02:16:46.910272+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.19.70.186/
2020-08-20T02:16:46.910678+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-08-20T02:16:46.910753+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-08-20T02:16:46.910818+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-08-20T02:16:46.910981+00:00 app[web.1]: Starting the development server...
2020-08-20T02:16:46.910981+00:00 app[web.1]:
2020-08-20T02:16:47.027054+00:00 heroku[web.1]: Process exited with status 0
2020-08-20T02:16:47.064473+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-20T02:16:49.868294+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=guarded-depths-86821.herokuapp.com request_id=2fa4ba33-25e5-4954-96c1-0ae870df9733 fwd="98.252.127.199" dyno= connect= service= status=503 bytes= protocol=https
2020-08-20T02:18:16.488972+00:00 heroku[web.1]: State changed from crashed to starting
2020-08-20T02:18:25.931282+00:00 heroku[web.1]: Starting process with command `npm start`
2020-08-20T02:18:29.027258+00:00 app[web.1]:
2020-08-20T02:18:29.027291+00:00 app[web.1]: > my-app#0.1.0 start /app
2020-08-20T02:18:29.027292+00:00 app[web.1]: > react-scripts start
2020-08-20T02:18:29.027292+00:00 app[web.1]:
2020-08-20T02:18:32.269220+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.23.86/
2020-08-20T02:18:32.269587+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-08-20T02:18:32.269687+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-08-20T02:18:32.269808+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-08-20T02:18:32.270062+00:00 app[web.1]: Starting the development server...
2020-08-20T02:18:32.270063+00:00 app[web.1]:
2020-08-20T02:18:32.371853+00:00 heroku[web.1]: Process exited with status 0
2020-08-20T02:18:32.411618+00:00 heroku[web.1]: State changed from starting to crashed
2020-08-20T02:18:49.691244+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=guarded-depths-86821.herokuapp.com request_id=b04d3419-ee10-4063-865f-d34ed4aee58e fwd="98.252.127.199" dyno= connect= service= status=503 bytes= protocol=https
You are using Webpack dev server. That server is not production ready and has a lot of different confiurations.
In simple words, in React, you use npm start to launch your app on your dev server. If you want to host your app, then you first build the artifacts by running npm run build which will generate all the artifacts in the dist folder in your application. Then, you take the contents from the dist directory and deploy it on a server.
To deploy it anywhere, you will need a server to host your files. Heroku, however has automated some of the deployment process for hosting apps.
Check this blog published by the Heroku team which shows how you can deploy the application with ZERO config.
I made a react application that works with a prisma - graphql server. The server is located inside the react application. I want to deploy it with Heroku (first time ever using it). When I deploy to Heroku I get this error when I run heroku logs --tail
020-06-12T14:10:04.296156+00:00 heroku[web.1]: Process exited with status 0
2020-06-12T14:10:04.332716+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-12T14:10:04.335407+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-12T14:10:15.424387+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-12T14:10:17.947363+00:00 app[web.1]:
2020-06-12T14:10:17.947379+00:00 app[web.1]: > business-scheduler#0.1.0 start /app
2020-06-12T14:10:17.947379+00:00 app[web.1]: > react-scripts start
2020-06-12T14:10:17.947379+00:00 app[web.1]:
2020-06-12T14:10:20.724920+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.19.52.78/
2020-06-12T14:10:20.725386+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-12T14:10:20.725577+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-12T14:10:20.725681+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-12T14:10:20.725971+00:00 app[web.1]: Starting the development server...
2020-06-12T14:10:20.725972+00:00 app[web.1]:
2020-06-12T14:10:20.803624+00:00 heroku[web.1]: Process exited with status 0
2020-06-12T14:10:20.835709+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-12T14:27:07.241917+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=appoint-scheduler.herokuapp.com request_id=4a6d7846-488a-4a57-bd76-ee5b84c197fc fwd="94.227.127.41" dyno= connect= service= status=503 bytes= protocol=https
2020-06-12T14:27:07.688859+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=appoint-scheduler.herokuapp.com request_id=83928da3-bc4a-44f5-83fb-66a7c5b2611d fwd="94.227.127.41" dyno= connect= service= status=503 bytes= protocol=https
I am using yarn not npm on my project does anyone know what I need to do to be able to deploy my project?
Because my project is not running on heroku because I get this when trying to open the deployed version
Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail
I think the issue is that you're trying to start the react development server on heroku. Your react app should be served as a static js bundle which is generated after you run the production build cmd npm run build.
Have a look at https://github.com/mars/create-react-app-buildpack which is developed for this usecase only and makes it much easier.
If you're trying to deploy the whole stack ( react + prisma + graphql server )...take a look at this post which covers it in detail.
Hope this helps !
i created an application with React.Js which fetches data using API. But when i tried deploying it over Heroku platform, it gave me error : Application Error
I have executed the steps specified on the heroku website, it is as follows:
Install the Heroku CLI
Download and install the Heroku CLI.
If you haven't already, log in to your Heroku account and follow the prompts to create a new SSH public key.
$ heroku login
Clone the repository
Use Git to clone app's source code to your local machine.
$ heroku git:clone -a app-name
$ cd app-name
Deploy your changes
Make some changes to the code you just cloned and deploy them to Heroku using Git.
$ git add .
$ git commit -am "make it better"
$ git push heroku master
It didn't worked!
Here is the log:
2020-06-22T12:40:27.850239+00:00 app[web.1]: > react-scripts start
2020-06-22T12:40:27.850239+00:00 app[web.1]:
2020-06-22T12:40:34.380682+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.125.90/
2020-06-22T12:40:34.381510+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-22T12:40:34.381685+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-22T12:40:34.381845+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-22T12:40:34.382179+00:00 app[web.1]: Starting the development server...
2020-06-22T12:40:34.382181+00:00 app[web.1]:
2020-06-22T12:40:34.546503+00:00 heroku[web.1]: Process exited with status 0
2020-06-22T12:40:34.619734+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-22T14:12:41.785222+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-22T14:12:52.279485+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-22T14:12:55.303019+00:00 app[web.1]:
2020-06-22T14:12:55.303037+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-22T14:12:55.303038+00:00 app[web.1]: > react-scripts start
2020-06-22T14:12:55.303038+00:00 app[web.1]:
2020-06-22T14:12:58.615357+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.197.178/
2020-06-22T14:12:58.616148+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-22T14:12:58.616286+00:00 app[web.1]: ℹ 「wds��: Content not from webpack is served from /app/public
2020-06-22T14:12:58.616415+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-22T14:12:58.616671+00:00 app[web.1]: Starting the development server...
2020-06-22T14:12:58.616672+00:00 app[web.1]:
2020-06-22T14:12:58.788743+00:00 heroku[web.1]: Process exited with status 0
2020-06-22T14:12:58.845133+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-22T17:03:45.196711+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-22T17:03:58.482038+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-22T17:04:02.420806+00:00 app[web.1]:
2020-06-22T17:04:02.420839+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-22T17:04:02.420839+00:00 app[web.1]: > react-scripts start
2020-06-22T17:04:02.420840+00:00 app[web.1]:
2020-06-22T17:04:09.746354+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.93.82/
2020-06-22T17:04:09.746878+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-22T17:04:09.747007+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-22T17:04:09.747116+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-22T17:04:09.747412+00:00 app[web.1]: Starting the development server...
2020-06-22T17:04:09.747413+00:00 app[web.1]:
2020-06-22T17:04:09.999824+00:00 heroku[web.1]: Process exited with status 0
2020-06-22T17:04:10.062284+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-22T22:50:40.650238+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-22T22:50:48.917468+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-22T22:50:51.112063+00:00 app[web.1]:
2020-06-22T22:50:51.112085+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-22T22:50:51.112086+00:00 app[web.1]: > react-scripts start
2020-06-22T22:50:51.112086+00:00 app[web.1]:
2020-06-22T22:50:53.533795+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.140.22/
2020-06-22T22:50:53.534116+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-22T22:50:53.534199+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-22T22:50:53.534267+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-22T22:50:53.534433+00:00 app[web.1]: Starting the development server...
2020-06-22T22:50:53.534434+00:00 app[web.1]:
2020-06-22T22:50:53.615116+00:00 heroku[web.1]: Process exited with status 0
2020-06-22T22:50:53.658116+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-23T04:30:26.154959+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-23T04:30:33.609175+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-23T04:30:35.459308+00:00 app[web.1]:
2020-06-23T04:30:35.459322+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-23T04:30:35.459322+00:00 app[web.1]: > react-scripts start
2020-06-23T04:30:35.459323+00:00 app[web.1]:
2020-06-23T04:30:37.539192+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.16.168.226/
2020-06-23T04:30:37.539532+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-23T04:30:37.539611+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-23T04:30:37.539677+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-23T04:30:37.539842+00:00 app[web.1]: Starting the development server...
2020-06-23T04:30:37.539843+00:00 app[web.1]:
2020-06-23T04:30:37.607952+00:00 heroku[web.1]: Process exited with status 0
2020-06-23T04:30:37.640598+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-23T09:58:58.290664+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-23T09:59:07.251577+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-23T09:59:10.172374+00:00 app[web.1]:
2020-06-23T09:59:10.172390+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-23T09:59:10.172390+00:00 app[web.1]: > react-scripts start
2020-06-23T09:59:10.172390+00:00 app[web.1]:
2020-06-23T09:59:12.250288+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.17.189.230/
2020-06-23T09:59:12.250803+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-23T09:59:12.250906+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-23T09:59:12.251013+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-23T09:59:12.251258+00:00 app[web.1]: Starting the development server...
2020-06-23T09:59:12.251259+00:00 app[web.1]:
2020-06-23T09:59:12.385028+00:00 heroku[web.1]: Process exited with status 0
2020-06-23T09:59:12.442788+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-23T15:35:27.646908+00:00 heroku[web.1]: State changed from crashed to starting
2020-06-23T15:35:36.951718+00:00 heroku[web.1]: Starting process with command `npm start`
2020-06-23T15:35:39.713025+00:00 app[web.1]:
2020-06-23T15:35:39.713071+00:00 app[web.1]: > covidtracker#0.1.0 start /app
2020-06-23T15:35:39.713071+00:00 app[web.1]: > react-scripts start
2020-06-23T15:35:39.713072+00:00 app[web.1]:
2020-06-23T15:35:42.169764+00:00 app[web.1]: ℹ 「wds」: Project is running at http://172.18.13.178/
2020-06-23T15:35:42.170140+00:00 app[web.1]: ℹ 「wds」: webpack output is served from
2020-06-23T15:35:42.170236+00:00 app[web.1]: ℹ 「wds」: Content not from webpack is served from /app/public
2020-06-23T15:35:42.170324+00:00 app[web.1]: ℹ 「wds」: 404s will fallback to /
2020-06-23T15:35:42.170506+00:00 app[web.1]: Starting the development server...
2020-06-23T15:35:42.170510+00:00 app[web.1]:
2020-06-23T15:35:42.247228+00:00 heroku[web.1]: Process exited with status 0
2020-06-23T15:35:42.285901+00:00 heroku[web.1]: State changed from starting to crashed
2020-06-23T16:23:37.027952+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=covid-007.herokuapp.com request_id=9b037027-7e0b-4a10-900e-9f306494d592 fwd="182.66.42.58" dyno= connect= service= status=503 bytes= protocol=https
2020-06-23T16:23:38.306139+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=covid-007.herokuapp.com request_id=db0251b8-ca7d-49d4-8561-f16d5834ab6f fwd="182.66.42.58" dyno= connect= service= status=503 bytes= protocol=https
2020-06-23T17:37:05.660570+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=covid-007.herokuapp.com request_id=a5b567d5-792c-492a-ba30-566590b7f3bf fwd="182.66.43.250" dyno= connect= service= status=503 bytes= protocol=https
2020-06-23T17:37:06.677313+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=covid-007.herokuapp.com request_id=8fa7e49f-d40e-48af-ba0a-db77420f8138 fwd="182.66.43.250" dyno= connect= service= status=503 bytes= protocol=https
2020-06-23T17:42:09.440304+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=covid-007.herokuapp.com request_id=b786c7e4-c4ff-4ce4-bd9c-139651c61845 fwd="182.66.168.226" dyno= connect= service= status=503 bytes= protocol=https
2020-06-23T17:42:10.695333+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=covid-007.herokuapp.com request_id=f16c168d-3bf6-40fe-ba7c-60c9f5b8199e fwd="182.66.168.226" dyno= connect= service= status=503 bytes= protocol=https
Here is my package.json:
{
"name": "covidtracker",
"version": "0.1.0",
"private": true,
"dependencies": {
"#material-ui/core": "^4.10.2",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"axios": "^0.19.2",
"chart.js": "^2.9.3",
"classnames": "^2.2.6",
"react": "^16.13.1",
"react-chartjs-2": "^2.9.0",
"react-countup": "^4.3.3",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1"
},
"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"
]
}
}
Any sort of help would be appreciated as i'm totally clueless!
In Settings change the buildpack to https://github.com/mars/create-react-app-buildpack and then deploy again, this problem will get solved. It worked for me!
I had the same issue. Not sure what's going on behind the scenes but for me it was the react scripts package. After rolling back react-scripts package from 3.4.1 to 3.4.0 it fixed the issue.
I have problem when deploy my app to heroku, i'm using react,next,adonis for build this app.
My env i put in reveal config vars heroku manually
This is my logs error in heroku tail
2019-08-20T09:26:20.148145+00:00 heroku[web.1]: Starting process with command `npm start`
2019-08-20T09:26:22.364045+00:00 app[web.1]:
2019-08-20T09:26:22.364077+00:00 app[web.1]: > adonis-fullstack-app#4.1.0 start /app
2019-08-20T09:26:22.364079+00:00 app[web.1]: > node server.js --production
2019-08-20T09:26:22.364081+00:00 app[web.1]:
2019-08-20T09:26:22.998945+00:00 app[web.1]:
2019-08-20T09:26:22.998985+00:00 app[web.1]: WARNING: Adonis has detected an unhandled promise rejection, which may
2019-08-20T09:26:22.998988+00:00 app[web.1]: cause undesired behavior in production.
2019-08-20T09:26:22.998991+00:00 app[web.1]: To stop this warning, use catch() on promises or wrap await
2019-08-20T09:26:22.998993+00:00 app[web.1]: calls inside try/catch.
2019-08-20T09:26:22.998995+00:00 app[web.1]:
2019-08-20T09:26:23.003594+00:00 app[web.1]: { Error: ENOENT: no such file or directory, open '/app/.env'
2019-08-20T09:26:23.003598+00:00 app[web.1]: at Object.openSync (fs.js:443:3)
2019-08-20T09:26:23.003600+00:00 app[web.1]: at Object.readFileSync (fs.js:343:35)
2019-08-20T09:26:23.003602+00:00 app[web.1]: at Env.load (/app/node_modules/#adonisjs/framework/src/Env/index.js:110:41)
2019-08-20T09:26:23.003605+00:00 app[web.1]: at new Env (/app/node_modules/#adonisjs/framework/src/Env/index.js:42:22)
2019-08-20T09:26:23.003607+00:00 app[web.1]: at Object.app.singleton [as closure] (/app/node_modules/#adonisjs/framework/providers/AppProvider.js:29:14)
2019-08-20T09:26:23.003610+00:00 app[web.1]: at Ioc._resolveBinding (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:231:68)
2019-08-20T09:26:23.003612+00:00 app[web.1]: at Ioc.use (/app/node_modules/#adonisjs/fold/src/Ioc/index.js:731:19)
2019-08-20T09:26:23.003614+00:00 app[web.1]: at NextProvider.register (/app/node_modules/adonis-nextjs/providers/NextProvider/index.js:38:24)
2019-08-20T09:26:23.003615+00:00 app[web.1]: at _.filter.each (/app/node_modules/#adonisjs/fold/src/Registrar/index.js:128:36)
2019-08-20T09:26:23.003618+00:00 app[web.1]: at arrayEach (/app/node_modules/lodash/lodash.js:516:11) errno: -2, syscall: 'open', code: 'ENOENT', path: '/app/.env' }
2019-08-20T09:26:23.021016+00:00 app[web.1]:
2019-08-20T09:26:23.021021+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/.env'
2019-08-20T09:26:23.021023+00:00 app[web.1]:
2019-08-20T09:26:23.021024+00:00 app[web.1]:
2019-08-20T09:26:23.021026+00:00 app[web.1]: 1 Env.load
2019-08-20T09:26:23.021028+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/src/Env/index.js:110
2019-08-20T09:26:23.021030+00:00 app[web.1]:
2019-08-20T09:26:23.021032+00:00 app[web.1]: 2 new Env
2019-08-20T09:26:23.021035+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/src/Env/index.js:42
2019-08-20T09:26:23.021036+00:00 app[web.1]:
2019-08-20T09:26:23.021039+00:00 app[web.1]: 3 Object.app.singleton [as closure]
2019-08-20T09:26:23.021041+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/providers/AppProvider.js:29
2019-08-20T09:26:23.021043+00:00 app[web.1]:
2019-08-20T09:26:23.021045+00:00 app[web.1]: 4 Ioc._resolveBinding
2019-08-20T09:26:23.021047+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Ioc/index.js:231
2019-08-20T09:26:23.021049+00:00 app[web.1]:
2019-08-20T09:26:23.021051+00:00 app[web.1]: 5 Ioc.use
2019-08-20T09:26:23.021053+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Ioc/index.js:731
2019-08-20T09:26:23.021055+00:00 app[web.1]:
2019-08-20T09:26:23.021057+00:00 app[web.1]: 6 AppProvider.boot
2019-08-20T09:26:23.021059+00:00 app[web.1]: /app/node_modules/#adonisjs/framework/providers/AppProvider.js:337
2019-08-20T09:26:23.021061+00:00 app[web.1]:
2019-08-20T09:26:23.021063+00:00 app[web.1]: 7 _.filter.map
2019-08-20T09:26:23.021065+00:00 app[web.1]: /app/node_modules/#adonisjs/fold/src/Registrar/index.js:147
2019-08-20T09:26:23.021066+00:00 app[web.1]:
2019-08-20T09:26:23.021068+00:00 app[web.1]: 8 arrayMap
2019-08-20T09:26:23.021070+00:00 app[web.1]: /app/node_modules/lodash/lodash.js:639
2019-08-20T09:26:23.021072+00:00 app[web.1]:
2019-08-20T09:26:23.029460+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-08-20T09:26:23.029933+00:00 app[web.1]: npm ERR! errno 1
2019-08-20T09:26:23.031184+00:00 app[web.1]: npm ERR! adonis-fullstack-app#4.1.0 start: `node server.js --production`
2019-08-20T09:26:23.031327+00:00 app[web.1]: npm ERR! Exit status 1
2019-08-20T09:26:23.031582+00:00 app[web.1]: npm ERR!
2019-08-20T09:26:23.031795+00:00 app[web.1]: npm ERR! Failed at the adonis-fullstack-app#4.1.0 start script.
2019-08-20T09:26:23.032063+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-08-20T09:26:23.037560+00:00 app[web.1]:
2019-08-20T09:26:23.037776+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-08-20T09:26:23.037921+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-08-20T09_26_23_033Z-debug.log
2019-08-20T09:26:23.100987+00:00 heroku[web.1]: Process exited with status 1
2019-08-20T09:26:23.118856+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-20T09:26:35.633644+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=myapp.herokuapp.com request_id=d42ff289-f989-4386-a521-d22a650b44ba fwd="103.87.85.198" dyno= connect= service= status=503 bytes= protocol=https
2019-08-20T09:26:35.979151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=myapp.herokuapp.com request_id=44d7c31f-3b53-49dd-a6b0-13fa5b113004 fwd="103.87.85.198" dyno= connect= service= status=503 bytes= protocol=https
I already try some solution in another forum but not solved
This is my package json
"scripts": {
"start": "node server.js --production",
"heroku-postbuild": "npm run build",
"test": "node ace test",
"dev": "node server.js",
"build": "next build ./next",
"export": "next export ./next"
},
I already look in another but maybe not same implement with my project, any solution?
Do you have the ENV_SILENT parameter in the heroku variables?
Have a nice day
If .env file is missing, AdonisJs throws an exception by default. However, you turn off the exception as follows
somewhere in your code, you are trying to open the .env file. so generate an error.
You can disable .env file and directly use your system environment variables visit this page for more information
Not a duplicate of Application Error when I deploy to heroku as they were missing a file.
Not a duplicate of Heroku Application Error When Deploying to Heroku which was a problem for a Ruby app.
Expected Result
I should be able to see my blog (built with Gatsby) deployed to heroku at its url at http://vllg.herokuapp.com/
Actual Result
The page shows an error which instructs me to check my logs, below is the result.
LOGS
2019-03-13T21:41:28.488417+00:00 app[web.1]: success createPages — 0.066 s
2019-03-13T21:41:28.539587+00:00 app[web.1]: success createPagesStatefully — 0.051 s
2019-03-13T21:41:28.542875+00:00 app[web.1]: success onPreExtractQueries — 0.003 s
2019-03-13T21:41:28.856797+00:00 app[web.1]: success update schema — 0.314 s
2019-03-13T21:41:28.917320+00:00 app[web.1]: warning Using the global `graphql` tag is deprecated, and will not be supported in v3.
2019-03-13T21:41:28.917324+00:00 app[web.1]: Import it instead like: import { graphql } from 'gatsby' in file:
2019-03-13T21:41:28.917326+00:00 app[web.1]: /app/src/pages/blog.js
2019-03-13T21:41:28.999695+00:00 app[web.1]: success extract queries from components — 0.143 s
2019-03-13T21:41:29.155426+00:00 app[web.1]: success run graphql queries — 0.156 s — 10/10 64.94 queries/second
2019-03-13T21:41:29.159995+00:00 app[web.1]: success write out page data — 0.004 s
2019-03-13T21:41:29.160825+00:00 app[web.1]: success write out redirect data — 0.001 s
2019-03-13T21:41:29.362576+00:00 app[web.1]: done generating icons for manifest
2019-03-13T21:41:29.363187+00:00 app[web.1]: success onPostBootstrap — 0.202 s
2019-03-13T21:41:29.363362+00:00 app[web.1]:
2019-03-13T21:41:29.363506+00:00 app[web.1]: info bootstrap finished - 6.089 s
2019-03-13T21:41:29.363561+00:00 app[web.1]:
2019-03-13T21:41:35.474922+00:00 app[web.1]: DONE Compiled successfully in 4713ms9:41:35 PM
2019-03-13T21:41:35.475029+00:00 app[web.1]:
2019-03-13T21:41:35.488519+00:00 app[web.1]:
2019-03-13T21:41:35.488812+00:00 app[web.1]: You can now view vllg in the browser.
2019-03-13T21:41:35.488882+00:00 app[web.1]:
2019-03-13T21:41:35.488935+00:00 app[web.1]: http://localhost:8000/
2019-03-13T21:41:35.489000+00:00 app[web.1]:
2019-03-13T21:41:35.489074+00:00 app[web.1]: View GraphiQL, an in-browser IDE, to explore your site's data and schema
2019-03-13T21:41:35.489139+00:00 app[web.1]:
2019-03-13T21:41:35.489197+00:00 app[web.1]: http://localhost:8000/___graphql
2019-03-13T21:41:35.489246+00:00 app[web.1]:
2019-03-13T21:41:35.489329+00:00 app[web.1]: Note that the development build is not optimized.
2019-03-13T21:41:35.489406+00:00 app[web.1]: To create a production build, use npm run build
2019-03-13T21:41:35.489460+00:00 app[web.1]:
2019-03-13T21:41:35.518813+00:00 app[web.1]: ℹ 「wdm」:
2019-03-13T21:41:35.518919+00:00 app[web.1]: ℹ 「wdm」: Compiled successfully.
2019-03-13T21:42:21.505858+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-03-13T21:42:21.505911+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-03-13T21:42:21.660871+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-13T21:42:21.643794+00:00 heroku[web.1]: Process exited with status 137
2019-03-14T03:25:18.012932+00:00 heroku[web.1]: State changed from crashed to starting
2019-03-14T03:25:26.974905+00:00 heroku[web.1]: Starting process with command `npm start`
2019-03-14T03:25:29.221439+00:00 app[web.1]:
2019-03-14T03:25:29.221465+00:00 app[web.1]: > vllg#0.1.0 start /app
2019-03-14T03:25:29.221467+00:00 app[web.1]: > npm run develop
2019-03-14T03:25:29.221469+00:00 app[web.1]:
2019-03-14T03:25:29.642388+00:00 app[web.1]:
2019-03-14T03:25:29.642437+00:00 app[web.1]: > vllg#0.1.0 develop /app
2019-03-14T03:25:29.642951+00:00 app[web.1]: > gatsby develop
2019-03-14T03:25:29.642954+00:00 app[web.1]:
2019-03-14T03:25:34.179104+00:00 app[web.1]: lscpu: failed to determine number of CPUs: /sys/devices/system/cpu/possible: No such file or directory
2019-03-14T03:25:34.371576+00:00 app[web.1]: success open and validate gatsby-configs — 0.018 s
2019-03-14T03:25:35.101757+00:00 app[web.1]: success load plugins — 0.729 s
2019-03-14T03:25:36.254992+00:00 app[web.1]: success onPreInit — 1.153 s
2019-03-14T03:25:36.301769+00:00 app[web.1]: success delete html and css files from previous builds — 0.047 s
2019-03-14T03:25:36.341230+00:00 app[web.1]: success initialize cache — 0.039 s
2019-03-14T03:25:36.394596+00:00 app[web.1]: success copy gatsby files — 0.053 s
2019-03-14T03:25:36.405920+00:00 app[web.1]: success onPreBootstrap — 0.011 s
2019-03-14T03:25:36.570578+00:00 app[web.1]: success source and transform nodes — 0.165 s
2019-03-14T03:25:37.534865+00:00 app[web.1]: success building schema — 0.964 s
2019-03-14T03:25:37.682403+00:00 app[web.1]: success createPages — 0.145 s
2019-03-14T03:25:37.846729+00:00 app[web.1]: success createPagesStatefully — 0.164 s
2019-03-14T03:25:37.856984+00:00 app[web.1]: success onPreExtractQueries — 0.010 s
2019-03-14T03:25:38.258545+00:00 app[web.1]: success update schema — 0.401 s
2019-03-14T03:25:38.381310+00:00 app[web.1]: warning Using the global `graphql` tag is deprecated, and will not be supported in v3.
2019-03-14T03:25:38.381315+00:00 app[web.1]: Import it instead like: import { graphql } from 'gatsby' in file:
2019-03-14T03:25:38.381317+00:00 app[web.1]: /app/src/pages/blog.js
2019-03-14T03:25:38.546084+00:00 app[web.1]: success extract queries from components — 0.287 s
2019-03-14T03:25:38.877403+00:00 app[web.1]: success run graphql queries — 0.331 s — 10/10 30.74 queries/second
2019-03-14T03:25:38.888429+00:00 app[web.1]: success write out page data — 0.011 s
2019-03-14T03:25:38.889427+00:00 app[web.1]: success write out redirect data — 0.001 s
2019-03-14T03:25:39.394941+00:00 app[web.1]: done generating icons for manifest
2019-03-14T03:25:39.397600+00:00 app[web.1]: success onPostBootstrap — 0.508 s
2019-03-14T03:25:39.398607+00:00 app[web.1]:
2019-03-14T03:25:39.399205+00:00 app[web.1]: info bootstrap finished - 9.734 s
2019-03-14T03:25:39.399508+00:00 app[web.1]:
2019-03-14T03:25:49.598021+00:00 app[web.1]: DONE Compiled successfully in 7982ms3:25:49 AM
2019-03-14T03:25:49.598123+00:00 app[web.1]:
2019-03-14T03:25:49.668957+00:00 app[web.1]:
2019-03-14T03:25:49.669051+00:00 app[web.1]: You can now view vllg in the browser.
2019-03-14T03:25:49.669113+00:00 app[web.1]:
2019-03-14T03:25:49.669181+00:00 app[web.1]: http://localhost:8000/
2019-03-14T03:25:49.669263+00:00 app[web.1]:
2019-03-14T03:25:49.669509+00:00 app[web.1]: View GraphiQL, an in-browser IDE, to explore your site's data and schema
2019-03-14T03:25:49.669573+00:00 app[web.1]:
2019-03-14T03:25:49.669642+00:00 app[web.1]: http://localhost:8000/___graphql
2019-03-14T03:25:49.669711+00:00 app[web.1]:
2019-03-14T03:25:49.669766+00:00 app[web.1]: Note that the development build is not optimized.
2019-03-14T03:25:49.669875+00:00 app[web.1]: To create a production build, use npm run build
2019-03-14T03:25:49.669941+00:00 app[web.1]:
2019-03-14T03:25:49.809865+00:00 app[web.1]: ℹ 「wdm」:
2019-03-14T03:25:49.810002+00:00 app[web.1]: ℹ 「wdm」: Compiled successfully.
2019-03-14T03:26:27.415495+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-03-14T03:26:27.415791+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-03-14T03:26:27.640591+00:00 heroku[web.1]: Process exited with status 137
2019-03-14T03:26:27.669848+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-14T06:29:40.584512+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vllg.herokuapp.com request_id=05381bb0-3b5e-4191-b20f-bd1a0ab788fe fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:29:40.995063+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vllg.herokuapp.com request_id=69bc54f5-3ffc-469c-8919-7f46eef7ed3f fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:31:47.930409+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vllg.herokuapp.com request_id=53dd38e4-9b34-41fe-8838-2ce2f659ddc0 fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:31:48.205331+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vllg.herokuapp.com request_id=140a8ca7-0a44-4a91-83f7-9726a1c1a94b fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:50:31.151053+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vllg.herokuapp.com request_id=4aef2e8c-d00e-4fc6-9d72-f05fe676a7b1 fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:50:31.476418+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vllg.herokuapp.com request_id=af2c772d-3299-4767-8c7b-e2fa0de414ab fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:52:49.412131+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=vllg.herokuapp.com request_id=84f885b2-a2d7-42c5-a4ff-8b9f2d692c39 fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
2019-03-14T06:52:49.675993+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=vllg.herokuapp.com request_id=23679509-eff5-46c2-86e6-1971c91dc368 fwd="98.164.218.149" dyno= connect= service= status=503 bytes= protocol=http
Repo
My code repository is available to browse at https://github.com/JGallardo/vllg
Attempted solutions and research
I found a similar issue of status 137 at Heroku "Process exited with status 137" node.js app but not sure how to apply anything there to my project
I see an error about needing to build a production build? that was not in the instructions by heroku in the tutorial that i followed but i ran npm run build and don't see a new build folder.
I also see that there is a R 10 error, i found a similar issue mentioned in Heroku Boot Timeout (Error R10) but that seems to perhaps be a python project as I think a Procfile is only for Ruby projects?
I haven't used Heroku before but I can give you some guidance perhaps looking at your logs.
gatsby develop is supposed to be a development command only for when your testing the site so it looks like it's having a conflict, though you shouldn't be using that command anyways as it should be built with gatsby build. Using Gatsby develop also does not provide an optimized version of your site so your missing out on many of the benefits.
That said gatsby build creates a public folder in your directory with static assets. For testing locally you should use gatsby serve to properly view the build and make sure it works as expected. For Heroku you shouldn't have to use the serve command you should be able to just give it your static assets in the public folder.
You can also "teach" Heroku how to build for you following this guide. https://www.gatsbyjs.org/docs/deploying-to-heroku/
Can also confirm Netlify is awesome for static sites and Gatsby.
The error message says Web process failed to bind to $PORT within 60 seconds of launch.
Heroku randomly assigns a port and sets into variable $PORT.
If it doesn't find anything using that port for 60 seconds, app crashes.
The easiest option is to create a Procfile
and add something like web: gatsby serve -p $PORT -H 0.0.0.0
, which runs app in given env. variable.
Heroku is more useful for server-side apps. With the command build, Gatsby provides you a static version of your blog. This way, you can upload it on a CDN, it's way more performant. I would advise Netlify:
It's free
It's based on your GitHub account
It automatically deploys new changes (via git commit hooks)
You can even use a custom domain