How do I resolve my deployment 'application error' on Heroku? - node.js

Someone suggested Heroku. I connected it to my github. After deploying it tells me application error see below:
"
Application Logs
2021-05-13T05:33:11.974735+00:00 heroku[web.1]: State changed from crashed to starting
2021-05-13T05:33:17.434161+00:00 heroku[web.1]: Starting process with command `npm start`
2021-05-13T05:33:21.152639+00:00 app[web.1]: npm ERR! missing script: start
2021-05-13T05:33:21.177166+00:00 app[web.1]:
2021-05-13T05:33:21.179883+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-05-13T05:33:21.183465+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-05-13T05_33_21_153Z-debug.log
2021-05-13T05:33:21.253969+00:00 heroku[web.1]: Process exited with status 1
2021-05-13T05:33:21.354019+00:00 heroku[web.1]: State changed from starting to crashed
2021-05-13T05:33:22.611937+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=intelhubdev.herokuapp.com request_id=56993659-8105-4f1a-b1a0-ff53a2c65ae2 fwd="197.210.45.44" dyno= connect= service= status=503 bytes= protocol=https
2021-05-13T05:33:23.853075+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=intelhubdev.herokuapp.com request_id=fbd4eed8-7477-4de3-b3a2-6438c536c470 fwd="197.210.45.44" dyno= connect= service= status=503 bytes= protocol=https"

Related

Application Error when deploying Strapi to Heroku, but succcessful build?

I'm really new to Strapi followed this tutorial to deploy it using MongoDB and Heroku. The Strapi app successfully deployed to Heroku, but when I opened it, it says
"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."
Here's the build log:
-----> Building on the Heroku-20 stack
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
USE_YARN_CACHE=true
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
-----> Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
engines.yarn (package.json): unspecified (use default)
Resolving node version 14.x...
Downloading and installing node 14.15.5...
Using default npm version: 6.14.11
Resolving yarn version 1.22.x...
Downloading and installing yarn (1.22.10)
Installed yarn 1.22.10
! node_modules checked into source control
https://devcenter.heroku.com/articles/node-best-practices#only-git-the-important-bits
-----> Installing dependencies
Installing node modules (yarn.lock)
yarn install v1.22.10
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > strapi-provider-upload-cloudinary#3.5.0" has unmet peer dependency "strapi-plugin-upload#^3.1.6".
[4/4] Building fresh packages...
Done in 6.43s.
-----> Build
-----> Pruning devDependencies
yarn install v1.22.10
warning package.json: No license field
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > strapi-provider-upload-cloudinary#3.5.0" has unmet peer dependency "strapi-plugin-upload#^3.1.6".
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 0.72s.
-----> Caching build
- yarn cache
-----> Build succeeded!
! This app may not specify any way to start a node process
https://devcenter.heroku.com/articles/nodejs-support#default-web-process-type
! Unmet dependencies don't fail yarn install but may cause runtime issues
https://github.com/npm/npm/issues/7494
-----> Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
-----> Compressing...
Done: 34.8M
-----> Launching...
Released v10
https://we-the-genesis-strapi.herokuapp.com/ deployed to Heroku
Here's the output of heroku logs:
2021-02-21T06:22:05.341700+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T06:22:50.951762+00:00 app[api]: Rollback to v10 by user merinetan#gmail.com
2021-02-21T06:22:50.951762+00:00 app[api]: Release v13 created by user merinetan#gmail.com
2021-02-21T06:22:52.245919+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T06:22:54.607923+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T06:22:56.386071+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T06:22:56.394175+00:00 app[web.1]:
2021-02-21T06:22:56.394498+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T06:22:56.394653+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T06_22_56_386Z-debug.log
2021-02-21T06:22:56.442808+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T06:22:56.495544+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T06:25:45.223881+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=3ed63d3e-e250-4626-b783-02203af73712 fwd="3.80.167.121" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:26:05.476448+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=HEAD path="/" host=we-the-genesis-strapi.herokuapp.com request_id=78bb4932-55ce-49aa-b9ad-11ff1e09a70f fwd="217.182.175.162" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:28:23.814694+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=we-the-genesis-strapi.herokuapp.com request_id=9a3d44c0-03f4-4b27-9f43-f61c232ad732 fwd="107.23.45.127" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:28:24.092182+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=8a12e8ff-6d68-4265-96f7-69a8696c25a7 fwd="107.23.45.127" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:30:18.240690+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=a2033709-b957-4be0-ab71-c6b987bbf3ab fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:30:24.317897+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=we-the-genesis-strapi.herokuapp.com request_id=f4ab55e4-9e7c-4a29-8117-9cbdb53fc20e fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:35:39.745213+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T06:35:42.237997+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T06:35:44.215838+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T06:35:44.221068+00:00 app[web.1]:
2021-02-21T06:35:44.221326+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T06:35:44.221405+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T06_35_44_216Z-debug.log
2021-02-21T06:35:44.270848+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T06:35:44.328081+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T06:36:24.094434+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=3c048bbc-721a-4b96-bd5c-15eaab20b7d1 fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:36:25.661453+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=we-the-genesis-strapi.herokuapp.com request_id=870ef876-31f7-4e52-9b25-c9ec0c4d6cb8 fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:36:29.413655+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=249b6bdb-6d8d-4890-b6e0-ad6aa7555578 fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:36:29.981010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=we-the-genesis-strapi.herokuapp.com request_id=8fd73cd3-b900-42a0-b28c-d5a940c2ef06 fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:48:56.447385+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=d581c5b1-da4a-455b-8b3b-527494420dad fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T06:48:58.252921+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=we-the-genesis-strapi.herokuapp.com request_id=8e7c0f9a-d11e-4542-aff0-c466f61300ce fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T07:00:03.313920+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T07:00:06.449360+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T07:00:09.380555+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T07:00:09.385558+00:00 app[web.1]:
2021-02-21T07:00:09.385832+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T07:00:09.385944+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T07_00_09_381Z-debug.log
2021-02-21T07:00:09.471304+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T07:00:09.542349+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T07:50:27.036632+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=07fdd52d-a5da-41ba-aa04-f9709c15c1cd fwd="193.27.12.68" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T07:55:10.471814+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T07:55:13.315292+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T07:55:15.630158+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T07:55:15.639782+00:00 app[web.1]:
2021-02-21T07:55:15.640206+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T07:55:15.640407+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T07_55_15_631Z-debug.log
2021-02-21T07:55:15.691414+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T07:55:15.759805+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T07:56:03.843654+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T09:38:30.628336+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T09:38:33.486003+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T09:38:37.077175+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T09:38:37.083975+00:00 app[web.1]:
2021-02-21T09:38:37.084256+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T09:38:37.084355+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T09_38_37_077Z-debug.log
2021-02-21T09:38:37.151682+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T09:38:37.210620+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T10:02:04.794170+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=HEAD path="/" host=we-the-genesis-strapi.herokuapp.com request_id=8d7e9a50-825d-4ace-9433-2a0e1aecd135 fwd="217.182.175.162" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T12:23:54.511630+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T12:23:58.090780+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T12:24:01.254908+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T12:24:01.263262+00:00 app[web.1]:
2021-02-21T12:24:01.263926+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T12:24:01.264231+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T12_24_01_255Z-debug.log
2021-02-21T12:24:01.315068+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T12:24:01.404682+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T12:53:08.465603+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=we-the-genesis-strapi.herokuapp.com request_id=5b79c5f7-0c59-4e42-ad30-95828185385b fwd="182.253.245.120" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T12:53:10.017483+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=we-the-genesis-strapi.herokuapp.com request_id=e0d2774b-915a-41e1-b54b-1b13f8af4991 fwd="182.253.245.120" dyno= connect= service= status=503 bytes= protocol=https
2021-02-21T17:49:02.615126+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T17:49:05.568155+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T17:49:08.048349+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T17:49:08.055280+00:00 app[web.1]:
2021-02-21T17:49:08.055495+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T17:49:08.055581+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T17_49_08_049Z-debug.log
2021-02-21T17:49:08.101618+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T17:49:08.181685+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-21T23:41:17.655463+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-21T23:41:20.342548+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-21T23:41:22.677531+00:00 app[web.1]: npm ERR! missing script: start
2021-02-21T23:41:22.685929+00:00 app[web.1]:
2021-02-21T23:41:22.686316+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-21T23:41:22.686514+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-21T23_41_22_678Z-debug.log
2021-02-21T23:41:22.747850+00:00 heroku[web.1]: Process exited with status 1
2021-02-21T23:41:22.811171+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-22T05:33:36.567171+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-22T05:33:38.989078+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-22T05:33:41.308054+00:00 app[web.1]: npm ERR! missing script: start
2021-02-22T05:33:41.315909+00:00 app[web.1]:
2021-02-22T05:33:41.316276+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-22T05:33:41.316446+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-22T05_33_41_308Z-debug.log
2021-02-22T05:33:41.360219+00:00 heroku[web.1]: Process exited with status 1
2021-02-22T05:33:41.409789+00:00 heroku[web.1]: State changed from starting to crashed
2021-02-22T11:25:55.927138+00:00 heroku[web.1]: State changed from crashed to starting
2021-02-22T11:25:58.546244+00:00 heroku[web.1]: Starting process with command `npm start`
2021-02-22T11:26:00.817024+00:00 app[web.1]: npm ERR! missing script: start
2021-02-22T11:26:00.825946+00:00 app[web.1]:
2021-02-22T11:26:00.826186+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-02-22T11:26:00.826277+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-02-22T11_26_00_817Z-debug.log
2021-02-22T11:26:00.864484+00:00 heroku[web.1]: Process exited with status 1
2021-02-22T11:26:00.927770+00:00 heroku[web.1]: State changed from starting to crashed
Thanks!

why i get this error in Heroku nodejs hosting?

I have problems with heroku hosting idk what can i do. (the port probably correct: const PORT = process.env.PORT ||)
2020-09-07T20:45:20.640779+00:00 heroku[web.1]: State changed from crashed to starting
2020-09-07T20:45:20.304911+00:00 app[api]: Deploy d8237452 by user maurerkrisztian#gmail.com
2020-09-07T20:45:20.304911+00:00 app[api]: Release v7 created by user maurerkrisztian#gmail.com
2020-09-07T20:45:20.000000+00:00 app[api]: Build succeeded
2020-09-07T20:45:25.983410+00:00 heroku[web.1]: Starting process with command `npm start`
2020-09-07T20:45:28.650802+00:00 app[web.1]:
2020-09-07T20:45:28.650814+00:00 app[web.1]: > simple-rest-api#1.0.0 start /app
2020-09-07T20:45:28.650814+00:00 app[web.1]: > ts-node-dev app.ts
2020-09-07T20:45:28.650814+00:00 app[web.1]:
2020-09-07T20:45:29.326452+00:00 app[web.1]: ts-node-dev ver. 1.0.0-pre.58 (using ts-node ver. 8.10.2, typescript ver. 3.9.7)
2020-09-07T20:45:39.103732+00:00 app[web.1]: [ERROR] 20:45:39 Error: Cannot parse config file: '/app/config/production.json': SyntaxError: Unexpected end of JSON input
2020-09-07T20:46:26.541466+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2020-09-07T20:46:26.561313+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-09-07T20:46:26.665093+00:00 heroku[web.1]: Process exited with status 137
2020-09-07T20:46:26.718342+00:00 heroku[web.1]: State changed from starting to crashed
2020-09-07T20:46:28.765964+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/echo" host=anime-stream-api.herokuapp.com request_id=d2794c21-f597-44e0-86f8-d6df00c2fac1 fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T20:46:30.035002+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=anime-stream-api.herokuapp.com request_id=2a36961c-812a-412c-acb3-13b01d962394 fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https
2020-09-07T20:46:34.664255+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/echo" host=anime-stream-api.herokuapp.com request_id=1b02724a-887e-4881-8fde-2e025fc6ed1c fwd="84.236.68.164" dyno= connect= service= status=503 bytes= protocol=https
production.json probably has an error, check if it is a valid JSON code

Heroku App on deployment gets a H10 & 503 error

So on deploying my app to Heroku, it has started crashing. Unfortunately the log doesn't help as there is no detail.
I have tried restarting the app & it doesn't help.
The env variables are entered
The builpack is set to heroku-nodejs
The above 3 are what I found on web. Thanks for all the help.
Here is the log from Heroku
2020-07-17T12:07:45.791581+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-07-17T12:07:45.791685+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-07-17T12_07_45_784Z-debug.log
2020-07-17T12:07:45.848851+00:00 heroku[web.1]: Process exited with status 1
2020-07-17T12:07:45.894326+00:00 heroku[web.1]: State changed from starting to crashed
2020-07-17T12:07:47.635979+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=marketool.herokuapp.com request_id=6af06835-645b-4427-b82d-1e77c46a3e98 fwd="42.106.46.78" dyno= connect= service= status=503 bytes= protocol=https
2020-07-17T12:07:49.538407+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=marketool.herokuapp.com request_id=48ff25a3-5b78-4ca6-80a0-d4d9bd170bf2 fwd="42.106.46.78" dyno= connect= service= status=503 bytes= protocol=https
Resolved this.
I had a wrong path for one of dependencies. Rectifying the right path is all that was needed.

Running Heroku through Terminal without success

I am trying to run through Terminal an app that I created on Heroku and I pushed my code to Heroku but when try to run in and my browser is up I get this error :
"An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details."
In the Heroku logs I get this :
2016-04-16T08:06:37.028300+00:00 heroku[api]: Enable Logplex by tommyahav#gmail.com
2016-04-16T08:06:37.028300+00:00 heroku[api]: Release v2 created by tommyahav#gmail.com
2016-04-16T08:11:17.934258+00:00 heroku[api]: Scale to web=1 by tommyahav#gmail.com
2016-04-16T08:11:17.998349+00:00 heroku[api]: Deploy d49f451 by tommyahav#gmail.com
2016-04-16T08:11:17.998349+00:00 heroku[api]: Release v3 created by tommyahav#gmail.com
2016-04-16T08:11:18.444546+00:00 heroku[slug-compiler]: Slug compilation started
2016-04-16T08:11:18.444556+00:00 heroku[slug-compiler]: Slug compilation finished
2016-04-16T08:11:20.996842+00:00 heroku[web.1]: Starting process with command `npm start`
2016-04-16T08:11:24.058359+00:00 app[web.1]: npm ERR! Linux 3.13.0-79-generic
2016-04-16T08:11:24.071525+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-04-16T08:11:24.075928+00:00 app[web.1]: npm ERR! node v5.10.0
2016-04-16T08:11:24.077165+00:00 app[web.1]: npm ERR! npm v3.8.3
2016-04-16T08:11:24.104687+00:00 app[web.1]: npm ERR! <https://github.com/npm/npm/issues>
2016-04-16T08:11:24.104275+00:00 app[web.1]: npm ERR! If you need help, you may report this error at:
2016-04-16T08:11:24.126366+00:00 app[web.1]:
2016-04-16T08:11:24.103431+00:00 app[web.1]: npm ERR! missing script: start
2016-04-16T08:11:24.126822+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-04-16T08:11:24.127038+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-04-16T08:11:24.094153+00:00 app[web.1]:
2016-04-16T08:11:24.104022+00:00 app[web.1]: npm ERR!
2016-04-16T08:11:25.136368+00:00 heroku[web.1]: Process exited with status 1
2016-04-16T08:11:25.157435+00:00 heroku[web.1]: State changed from crashed to starting
2016-04-16T08:11:25.156030+00:00 heroku[web.1]: State changed from starting to crashed
2016-04-16T08:11:26.642881+00:00 heroku[web.1]: Starting process with command `npm start`
2016-04-16T08:11:29.940545+00:00 app[web.1]: npm ERR! Linux 3.13.0-79-generic
2016-04-16T08:11:29.941387+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-04-16T08:11:29.941913+00:00 app[web.1]: npm ERR! node v5.10.0
2016-04-16T08:11:29.942627+00:00 app[web.1]: npm ERR! npm v3.8.3
2016-04-16T08:11:29.944449+00:00 app[web.1]:
2016-04-16T08:11:29.945912+00:00 app[web.1]: npm ERR! missing script: start
2016-04-16T08:11:29.946108+00:00 app[web.1]: npm ERR!
2016-04-16T08:11:29.946249+00:00 app[web.1]: npm ERR! If you need help, you may report this error at:
2016-04-16T08:11:29.946394+00:00 app[web.1]: npm ERR! <https://github.com/npm/npm/issues>
2016-04-16T08:11:29.979159+00:00 app[web.1]:
2016-04-16T08:11:29.979436+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2016-04-16T08:11:29.979573+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-04-16T08:11:31.099494+00:00 heroku[web.1]: Process exited with status 1
2016-04-16T08:11:31.111785+00:00 heroku[web.1]: State changed from starting to crashed
2016-04-16T08:11:41.679507+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=targil0.herokuapp.com request_id=b0e6c517-19bf-4fe9-b2ae-10a66a8531b7 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:11:42.011245+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=targil0.herokuapp.com request_id=5d888504-10b6-494c-97ba-300363c40ea8 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:33.276559+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=targil0.herokuapp.com request_id=a3bbb3d2-1b15-428f-8bc9-c084820d07b3 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:33.719142+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=targil0.herokuapp.com request_id=80f9fca8-8edd-40f1-876e-fd0d7c4629e8 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:34.583904+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=targil0.herokuapp.com request_id=f05e3322-020e-402a-abaf-3066b70f7524 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:35.024463+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=targil0.herokuapp.com request_id=abe440c1-e342-42c3-be8e-66534a27b9ed fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:56.404658+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=targil0.herokuapp.com request_id=6fa70ad5-bf10-4eb0-b3c6-e449a90ffadf fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:12:56.750374+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=targil0.herokuapp.com request_id=c188c52c-6117-4bcf-878c-a85892230160 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:13:44.397134+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=targil0.herokuapp.com request_id=9b61b821-4e3f-411f-89b0-2e8d50fdbc80 fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
2016-04-16T08:13:44.741220+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=targil0.herokuapp.com request_id=ff9b279c-6c23-4abc-bf9d-1b8f09964d5f fwd="79.183.166.1" dyno= connect= service= status=503 bytes=
Please help me and tell what I did wrong.
Thank you,
The important part is:
argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
missing script: start
Heroku is complaining it can't find the script you're telling it to launch.
Please print your Procfile, and scripts like index.js or package.json, depending on what your Procfile says.
If you didn't add a Procfile to your project root, then the default npm start is used, so you need a "scripts.start" property in the package.json file. So please print it :)
You may have a look at the Heroku guidelines (Getting started and Support) that deal with the Node deployment.

Keep getting an application error when trying to deploy a node app in heroku

I have been having difficulties deploying on heroku. Followed the deploying a node js app on heroku guide but still keep getting an application error. any idea why please? here is my heroku logs
heroku logs
2015-10-27T19:48:35.704758+00:00 heroku[api]: Enable Logplex by chineduabalogu#gmail.com
2015-10-27T19:48:35.704758+00:00 heroku[api]: Release v2 created by chineduabalogu#gmail.com
2015-10-27T19:57:58.536860+00:00 heroku[slug-compiler]: Slug compilation started
2015-10-27T19:57:58.536871+00:00 heroku[slug-compiler]: Slug compilation finished
2015-10-27T19:57:58.397214+00:00 heroku[api]: Scale to web=1 by chineduabalogu#gmail.com
2015-10-27T19:57:58.466140+00:00 heroku[api]: Deploy 51bdb1d by chineduabalogu#gmail.com
2015-10-27T19:57:58.466140+00:00 heroku[api]: Release v3 created by chineduabalogu#gmail.com
2015-10-27T19:58:00.692453+00:00 heroku[web.1]: Starting process with command `npm start`
2015-10-27T19:58:03.827532+00:00 app[web.1]:
2015-10-27T19:58:03.827554+00:00 app[web.1]: > node app.js
2015-10-27T19:58:03.827552+00:00 app[web.1]: > gf17#0.0.1 start /app
2015-10-27T19:58:03.827555+00:00 app[web.1]:
2015-10-27T19:58:04.616168+00:00 app[web.1]: Express server listening on port 3000
2015-10-27T19:59:00.972722+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-10-27T19:59:00.972722+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-10-27T19:59:01.940288+00:00 heroku[web.1]: State changed from starting to crashed
2015-10-27T19:59:01.941567+00:00 heroku[web.1]: State changed from crashed to starting
2015-10-27T19:59:01.932037+00:00 heroku[web.1]: Process exited with status 137
2015-10-27T19:59:04.247002+00:00 heroku[web.1]: Starting process with command `npm start`
2015-10-27T19:59:07.923766+00:00 app[web.1]:
2015-10-27T19:59:07.923776+00:00 app[web.1]: > gf17#0.0.1 start /app
2015-10-27T19:59:07.923778+00:00 app[web.1]: > node app.js
2015-10-27T19:59:07.923779+00:00 app[web.1]:
2015-10-27T19:59:09.513389+00:00 app[web.1]: Express server listening on port 3000
2015-10-27T20:00:04.705994+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-10-27T20:00:04.705994+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-10-27T20:00:05.657468+00:00 heroku[web.1]: State changed from starting to crashed
2015-10-27T20:00:05.644215+00:00 heroku[web.1]: Process exited with status 137
2015-10-27T20:17:45.559370+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-fjord-8286.herokuapp.com request_id=ce9f7865-5431-4514-83e3-9228df351291 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:17:46.110795+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-fjord-8286.herokuapp.com request_id=e7b1f9b7-4600-4ce7-b90c-3239a82abcb9 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:17:48.086903+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-fjord-8286.herokuapp.com request_id=8a41518c-cfd8-4dac-8622-1f94de9346b3 fwd="198.15.118.148" dyno= connect= service= status=503 bytes=
2015-10-27T20:17:48.543167+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-fjord-8286.herokuapp.com request_id=e1ce271b-7a76-43c1-931e-0ac9a375cfb7 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:19:48.784831+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-fjord-8286.herokuapp.com request_id=9229308a-6604-4426-8ba6-4cabb8b94de9 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:19:49.552910+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-fjord-8286.herokuapp.com request_id=e542cc92-ca00-4044-8c23-76642887ef35 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:22:17.304691+00:00 heroku[web.1]: State changed from crashed to starting
2015-10-27T20:22:19.261727+00:00 heroku[web.1]: Starting process with command `npm start`
2015-10-27T20:22:21.447920+00:00 app[web.1]:
2015-10-27T20:22:21.447934+00:00 app[web.1]: > gf17#0.0.1 start /app
2015-10-27T20:22:21.447935+00:00 app[web.1]: > node app.js
2015-10-27T20:22:21.447936+00:00 app[web.1]:
2015-10-27T20:22:22.123539+00:00 app[web.1]: Express server listening on port 3000
2015-10-27T20:23:19.916089+00:00 heroku[web.1]: Stopping process with SIGKILL
2015-10-27T20:23:19.916089+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2015-10-27T20:23:20.780482+00:00 heroku[web.1]: Process exited with status 137
2015-10-27T20:23:20.792567+00:00 heroku[web.1]: State changed from starting to crashed
2015-10-27T20:25:54.984210+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=evening-fjord-8286.herokuapp.com request_id=83eec29d-598c-44d1-b6bc-55933e60013f fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
2015-10-27T20:25:56.659875+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=evening-fjord-8286.herokuapp.com request_id=c384f7e6-e6e9-4088-bdf1-b7370b572b68 fwd="154.118.30.203" dyno= connect= service= status=503 bytes=
From your logs, it looks like you are NOT binding to the right port.
I'm going to assume that your Express.js app looks something like this:
app.listen(3000);
This line of code tells Express.js to start running a web server on port 3000. This is fine when you're writing code on your laptop, but when you deploy code to Heroku, Heroku will assign you a RANDOM port number that you MUST bind to.
So, to fix your problem, you should rewrite the above line of code to look like this:
app.listen(process.env.PORT || 3000);
This will tell your app to run on the correct Heroku port, but fall back to port 3000 when doing development on your local laptop =) This is the best of both worlds.
Hope this helps!

Resources