why is my heroku app crashing? - node.js

It's my first time trying to deploy an app on heroku and I am getting an application error, code H10 and H13.
This is what I see in my log:
2016-03-13T00:12:52.715324+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0
.1:27017
2016-03-13T00:12:52.715325+00:00 app[web.1]: at Object.exports._errnoExcepti
on (util.js:890:11)
2016-03-13T00:12:52.715325+00:00 app[web.1]: at exports._exceptionWithHostPo
rt (util.js:913:20)
2016-03-13T00:12:52.715326+00:00 app[web.1]: at TCPConnectWrap.afterConnect
[as oncomplete] (net.js:1057:14)
2016-03-13T00:12:52.723973+00:00 app[web.1]:
2016-03-13T00:12:52.731620+00:00 app[web.1]: npm ERR! Linux 3.13.0-77-generic
2016-03-13T00:12:52.732000+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bi
n/node" "/app/.heroku/node/bin/npm" "start"
2016-03-13T00:12:52.732236+00:00 app[web.1]: npm ERR! node v5.8.0
2016-03-13T00:12:52.732975+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-03-13T00:12:52.732648+00:00 app[web.1]: npm ERR! npm v3.7.3
2016-03-13T00:12:52.733150+00:00 app[web.1]: npm ERR! clementinejs-fcc#1.0.1 sta
rt: `node server.js`
2016-03-13T00:12:52.733317+00:00 app[web.1]: npm ERR! Exit status 1
2016-03-13T00:12:52.733490+00:00 app[web.1]: npm ERR!
2016-03-13T00:12:52.733660+00:00 app[web.1]: npm ERR! Failed at the clementinejs
-fcc#1.0.1 start script 'node server.js'.
2016-03-13T00:12:52.733828+00:00 app[web.1]: npm ERR! Make sure you have the lat
est version of node.js and npm installed.
2016-03-13T00:12:52.733992+00:00 app[web.1]: npm ERR! If you do, this is most li
kely a problem with the clementinejs-fcc package,
2016-03-13T00:12:52.734149+00:00 app[web.1]: npm ERR! not with npm itself.
2016-03-13T00:12:52.734297+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2016-03-13T00:12:52.734449+00:00 app[web.1]: npm ERR! node server.js
2016-03-13T00:12:52.734593+00:00 app[web.1]: npm ERR! You can get information on
how to open an issue for this project with:
2016-03-13T00:12:52.734754+00:00 app[web.1]: npm ERR! npm bugs clementinejs-
fcc
2016-03-13T00:12:52.734901+00:00 app[web.1]: npm ERR! Or if that isn't available
, you can get their info via:
2016-03-13T00:12:52.735055+00:00 app[web.1]: npm ERR! npm owner ls clementin
ejs-fcc
2016-03-13T00:12:52.735207+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2016-03-13T00:12:52.739195+00:00 app[web.1]:
2016-03-13T00:12:52.739538+00:00 app[web.1]: npm ERR! Please include the followi
ng file with any support request:
2016-03-13T00:12:52.739681+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-03-13T00:12:52.704158+00:00 heroku[router]: at=error code=H13 desc="Connect
ion closed without response" method=GET path="/" host=meek-fcc-voting.herokuapp.
com request_id=9479851e-9188-48c2-a73f-f5e27f36e002 fwd="151.229.234.60" dyno=we
b.1 connect=0ms service=39ms status=503 bytes=0
2016-03-13T00:12:53.331859+00:00 heroku[web.1]: State changed from crashed to st
arting
2016-03-13T00:12:53.330847+00:00 heroku[web.1]: State changed from up to crashed
2016-03-13T00:12:53.346439+00:00 heroku[web.1]: Process exited with status 1
2016-03-13T00:12:54.744232+00:00 heroku[web.1]: Starting process with command `n
pm start`
2016-03-13T00:12:57.384566+00:00 app[web.1]:
2016-03-13T00:12:57.384587+00:00 app[web.1]: > clementinejs-fcc#1.0.1 start /app
2016-03-13T00:12:57.384588+00:00 app[web.1]: > node server.js
2016-03-13T00:12:57.384589+00:00 app[web.1]:
2016-03-13T00:12:57.870106+00:00 app[web.1]: { [Error: ENOENT: no such file or d
irectory, open '.env'] errno: -2, code: 'ENOENT', syscall: 'open', path: '.env'
}
2016-03-13T00:12:57.898861+00:00 app[web.1]: Node.js listening on port 36707...
2016-03-13T00:12:58.404112+00:00 heroku[web.1]: State changed from starting to u
p
2016-03-13T00:13:02.175651+00:00 heroku[router]: at=info method=GET path="/favic
on.ico" host=meek-fcc-voting.herokuapp.com request_id=feb309ee-11e8-438c-bcdd-18
60b331cfa8 fwd="151.229.234.60" dyno=web.1 connect=5000ms service=35ms status=30
2 bytes=212
2016-03-13T00:13:02.315106+00:00 app[web.1]:
2016-03-13T00:13:02.315160+00:00 app[web.1]: /app/node_modules/mongodb/lib/serve
r.js:242
2016-03-13T00:13:02.315165+00:00 app[web.1]: process.nextTick(function()
{ throw err; })
2016-03-13T00:13:02.315166+00:00 app[web.1]:
^
2016-03-13T00:13:02.315191+00:00 app[web.1]: Error: connect ECONNREFUSED 127.0.0
.1:27017
2016-03-13T00:13:02.315193+00:00 app[web.1]: at Object.exports._errnoExcepti
on (util.js:890:11)
2016-03-13T00:13:02.315193+00:00 app[web.1]: at exports._exceptionWithHostPo
rt (util.js:913:20)
2016-03-13T00:13:02.315204+00:00 app[web.1]: at TCPConnectWrap.afterConnect
[as oncomplete] (net.js:1057:14)
2016-03-13T00:13:02.326288+00:00 app[web.1]:
2016-03-13T00:13:02.336078+00:00 app[web.1]: npm ERR! Linux 3.13.0-79-generic
2016-03-13T00:13:02.336527+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bi
n/node" "/app/.heroku/node/bin/npm" "start"
2016-03-13T00:13:02.336879+00:00 app[web.1]: npm ERR! node v5.8.0
2016-03-13T00:13:02.337616+00:00 app[web.1]: npm ERR! npm v3.7.3
2016-03-13T00:13:02.338000+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-03-13T00:13:02.338212+00:00 app[web.1]: npm ERR! clementinejs-fcc#1.0.1 sta
rt: `node server.js`
2016-03-13T00:13:02.338428+00:00 app[web.1]: npm ERR! Exit status 1
2016-03-13T00:13:02.338701+00:00 app[web.1]: npm ERR!
2016-03-13T00:13:02.338916+00:00 app[web.1]: npm ERR! Failed at the clementinejs
-fcc#1.0.1 start script 'node server.js'.
2016-03-13T00:13:02.339076+00:00 app[web.1]: npm ERR! Make sure you have the lat
est version of node.js and npm installed.
2016-03-13T00:13:02.339232+00:00 app[web.1]: npm ERR! If you do, this is most li
kely a problem with the clementinejs-fcc package,
2016-03-13T00:13:02.339647+00:00 app[web.1]: npm ERR! not with npm itself.
2016-03-13T00:13:02.339873+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2016-03-13T00:13:02.340099+00:00 app[web.1]: npm ERR! node server.js
2016-03-13T00:13:02.340319+00:00 app[web.1]: npm ERR! You can get information on
how to open an issue for this project with:
2016-03-13T00:13:02.340932+00:00 app[web.1]: npm ERR! npm bugs clementinejs-
fcc
2016-03-13T00:13:02.341092+00:00 app[web.1]: npm ERR! Or if that isn't available
, you can get their info via:
2016-03-13T00:13:02.344061+00:00 app[web.1]: npm ERR! npm owner ls clementin
ejs-fcc
2016-03-13T00:13:02.344238+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2016-03-13T00:13:02.349176+00:00 app[web.1]:
2016-03-13T00:13:02.349587+00:00 app[web.1]: npm ERR! Please include the followi
ng file with any support request:
2016-03-13T00:13:02.349872+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2016-03-13T00:13:02.335731+00:00 heroku[router]: at=error code=H13 desc="Connect
ion closed without response" method=GET path="/" host=meek-fcc-voting.herokuapp.
com request_id=e27992b9-29a9-49f7-ad05-c8b5fb610c3e fwd="151.229.234.60" dyno=we
b.1 connect=1ms service=43ms status=503 bytes=0
2016-03-13T00:13:03.171457+00:00 heroku[web.1]: Process exited with status 1
2016-03-13T00:13:03.188703+00:00 heroku[web.1]: State changed from up to crashed
2016-03-13T00:14:24.503648+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=meek-fcc-voting.herokuapp.com request_id=84c9f8a2
-2c33-4bcb-9a73-2a438b50700a fwd="151.229.234.60" dyno= connect= service= status
=503 bytes=
2016-03-13T00:14:24.879521+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=meek-fcc-voting.herokuapp.com request_
id=7d863bd0-4287-477f-b815-9528c9ee16ac fwd="151.229.234.60" dyno= connect= serv
ice= status=503 bytes=
It mention an npm debug log, but I have no idea where to find it. It's not in the app directory of the project.
I've tried to to heroku restart with no luck. If you have any idea what I'm missing I'd very much appreciate any help.
edit:
my config vars are
APP_URL=https://meek-fcc-voting.herokuapp.com/
MONGO_URI=mongodb://localhost:27017/

You need to setup your environment variables on Heroku. You can do it via the command line, or on the Settings Page. You can also use Heroku AddOns to get a MongoDB setup for you, which automatically adds the environment variables for connecting to it.

Related

Heroku deployment with node.js and postgresql api not working

I have been recently been working on a node.js api with a postgresql database that stores books.
When you go to the route /books it gives me the heroku application error page (here is the api https://node-api-with-books.herokuapp.com/books) and I followed this tutorial to make it https://www.taniarascia.com/node-express-postgresql-heroku/. It is driving me crazy and here is the error it gives when I do:
heroku logs --tail
2021-03-15T04:04:21.094893+00:00 app[web.1]: /app/index.js:12
2021-03-15T04:04:21.094902+00:00 app[web.1]: throw err;
2021-03-15T04:04:21.094903+00:00 app[web.1]: ^
2021-03-15T04:04:21.094904+00:00 app[web.1]:
2021-03-15T04:04:21.094904+00:00 app[web.1]: Error: self signed certificate
2021-03-15T04:04:21.094905+00:00 app[web.1]: at TLSSocket.onConnectSecure (node:_tls_wrap:1498:34)
2021-03-15T04:04:21.094906+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20)
2021-03-15T04:04:21.094906+00:00 app[web.1]: at TLSSocket._finishInit (node:_tls_wrap:933:8)
2021-03-15T04:04:21.094907+00:00 app[web.1]: at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:707:12) {
2021-03-15T04:04:21.094907+00:00 app[web.1]: code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
2021-03-15T04:04:21.094907+00:00 app[web.1]: }
2021-03-15T04:04:21.099759+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/books" host=node-api-with-books.herokuapp.com request_id=5ec4a052-1aed-4401-916d-1699f1fe9d3d fwd="66.7.125.54" dyno=web.1 connect=0ms service=50ms status=503 bytes=0 protocol=https
2021-03-15T04:04:21.100313+00:00 app[web.1]: npm notice
2021-03-15T04:04:21.100365+00:00 app[web.1]: npm notice New minor version of npm available! 7.0.8 -> 7.6.3
2021-03-15T04:04:21.100444+00:00 app[web.1]: npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.6.3>
2021-03-15T04:04:21.100541+00:00 app[web.1]: npm notice Run `npm install -g npm#7.6.3` to update!
2021-03-15T04:04:21.100619+00:00 app[web.1]: npm notice
2021-03-15T04:04:21.104741+00:00 app[web.1]: npm ERR! code 1
2021-03-15T04:04:21.104926+00:00 app[web.1]: npm ERR! path /app
2021-03-15T04:04:21.108208+00:00 app[web.1]: npm ERR! command failed
2021-03-15T04:04:21.108390+00:00 app[web.1]: npm ERR! command sh -c node index.js
2021-03-15T04:04:21.353877+00:00 app[web.1]:
2021-03-15T04:04:21.354099+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-15T04:04:21.354257+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-15T04_04_21_109Z-debug.log
2021-03-15T04:04:21.413929+00:00 heroku[web.1]: Process exited with status 1
2021-03-15T04:04:21.490613+00:00 heroku[web.1]: State changed from up to crashed
2021-03-15T04:04:21.495328+00:00 heroku[web.1]: State changed from crashed to starting
2021-03-15T04:04:24.629509+00:00 heroku[web.1]: Starting process with command `npm start`
2021-03-15T04:04:27.698683+00:00 app[web.1]:
2021-03-15T04:04:27.698698+00:00 app[web.1]: > working-rest-api#1.0.0 start
2021-03-15T04:04:27.698698+00:00 app[web.1]: > node index.js
2021-03-15T04:04:27.698698+00:00 app[web.1]:
2021-03-15T04:04:28.035756+00:00 app[web.1]: Server listening
2021-03-15T04:04:28.553149+00:00 heroku[web.1]: State changed from starting to up
2021-03-15T04:04:29.332623+00:00 app[web.1]: /app/index.js:12
2021-03-15T04:04:29.332639+00:00 app[web.1]: throw err;
2021-03-15T04:04:29.332640+00:00 app[web.1]: ^
2021-03-15T04:04:29.332641+00:00 app[web.1]:
2021-03-15T04:04:29.332641+00:00 app[web.1]: Error: self signed certificate
2021-03-15T04:04:29.332642+00:00 app[web.1]: at TLSSocket.onConnectSecure (node:_tls_wrap:1498:34)
2021-03-15T04:04:29.332643+00:00 app[web.1]: at TLSSocket.emit (node:events:327:20)
2021-03-15T04:04:29.332643+00:00 app[web.1]: at TLSSocket._finishInit (node:_tls_wrap:933:8)
2021-03-15T04:04:29.332643+00:00 app[web.1]: at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:707:12) {
2021-03-15T04:04:29.332644+00:00 app[web.1]: code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
2021-03-15T04:04:29.332644+00:00 app[web.1]: }
2021-03-15T04:04:29.340112+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/books" host=node-api-with-books.herokuapp.com request_id=8af9f82c-42c9-4399-9de3-ed80f7dee15a fwd="66.7.125.54" dyno=web.1 connect=1ms service=74ms status=503 bytes=0 protocol=https
2021-03-15T04:04:29.343368+00:00 app[web.1]: npm notice
2021-03-15T04:04:29.343566+00:00 app[web.1]: npm notice New minor version of npm available! 7.0.8 -> 7.6.3
2021-03-15T04:04:29.343688+00:00 app[web.1]: npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.6.3>
2021-03-15T04:04:29.343859+00:00 app[web.1]: npm notice Run `npm install -g npm#7.6.3` to update!
2021-03-15T04:04:29.344058+00:00 app[web.1]: npm notice
2021-03-15T04:04:29.348863+00:00 app[web.1]: npm ERR! code 1
2021-03-15T04:04:29.349087+00:00 app[web.1]: npm ERR! path /app
2021-03-15T04:04:29.352585+00:00 app[web.1]: npm ERR! command failed
2021-03-15T04:04:29.352766+00:00 app[web.1]: npm ERR! command sh -c node index.js
2021-03-15T04:04:29.364318+00:00 app[web.1]:
2021-03-15T04:04:29.364464+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-03-15T04:04:29.364515+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2021-03-15T04_04_29_354Z-debug.log
2021-03-15T04:04:29.443525+00:00 heroku[web.1]: Process exited with status 1
2021-03-15T04:04:29.510747+00:00 heroku[web.1]: State changed from up to crashed
I can add you on heroku if you have a idea
Here is my code on github https://github.com/PugmanD/gticlicker-api-and-book-api/tree/main
Any help is appreciated
After trying with the uploaded repo. I've confirmed the error lies at the following place
config.js
const pool = new Pool({
connectionString: isProduction ? process.env.DATABASE_URL : connectionString,
ssl: isProduction, // The problem is this setting
});
Update your config.js to following
const pool = new Pool({
connectionString: isProduction ? process.env.DATABASE_URL : connectionString,
ssl: {
rejectUnauthorized: false,
},
});
node-postgres did show how to setup the SSL in their documentation
https://node-postgres.com/features/ssl
The problem why u faced this is most likely that the node-postgres couldn't find your SSL cert, hence the error.
This is the heroku link that I've make it working, I will remove the project in a few days. Feel free to try it.
https://test-postgresl.herokuapp.com/books

Unable to push MERN App to heroku servers

So I have this MERN app pushed to my github repo https://github.com/Banialczele/coursemanagement and now I would like to push that repo to heroku.
My problem is that when ever I try to deploy my app to heroku server it deploys to server, but when I want to visit that link I got an error. However when I try to run heroku local web in my IDE my app runs perfectly, but when I want to deploy to server something is crushing all the time. This is what stacktrace looks like:
2020-03-14T12:25:20.748376+00:00 app[web.1]: [1] Error: Cannot find module 'express'
2020-03-14T12:25:20.748376+00:00 app[web.1]: [1] Require stack:
2020-03-14T12:25:20.748376+00:00 app[web.1]: [1] - /app/server/src/index.js
2020-03-14T12:25:20.748378+00:00 app[web.1]: [1] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
2020-03-14T12:25:20.748379+00:00 app[web.1]: [1] at Function.Module._load (internal/modules/cjs/loader.js:864:27)
2020-03-14T12:25:20.748379+00:00 app[web.1]: [1] at Module.require (internal/modules/cjs/loader.js:1044:19)
2020-03-14T12:25:20.748380+00:00 app[web.1]: [1] at require (internal/modules/cjs/helpers.js:77:18)
2020-03-14T12:25:20.748380+00:00 app[web.1]: [1] at Object.<anonymous> (/app/server/src/index.js:1:17)
2020-03-14T12:25:20.748380+00:00 app[web.1]: [1] at Module._compile (internal/modules/cjs/loader.js:1158:30)
2020-03-14T12:25:20.748380+00:00 app[web.1]: [1] at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
2020-03-14T12:25:20.748381+00:00 app[web.1]: [1] at Module.load (internal/modules/cjs/loader.js:1002:32)
2020-03-14T12:25:20.748381+00:00 app[web.1]: [1] at Function.Module._load (internal/modules/cjs/loader.js:901:14)
2020-03-14T12:25:20.748381+00:00 app[web.1]: [1] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12) {
2020-03-14T12:25:20.748381+00:00 app[web.1]: [1] code: 'MODULE_NOT_FOUND',
2020-03-14T12:25:20.748382+00:00 app[web.1]: [1] requireStack: [ '/app/server/src/index.js' ]
2020-03-14T12:25:20.748382+00:00 app[web.1]: [1] }
2020-03-14T12:25:20.756503+00:00 app[web.1]: [1] npm ERR! code ELIFECYCLE
2020-03-14T12:25:20.756505+00:00 app[web.1]: [1] npm ERR! errno 1
2020-03-14T12:25:20.759707+00:00 app[web.1]: [1] npm ERR! teachercourseapp#1.0.0 server: `cd server/src && node index.js`
2020-03-14T12:25:20.760641+00:00 app[web.1]: [1] npm ERR! Exit status 1
2020-03-14T12:25:20.760642+00:00 app[web.1]: [1] npm ERR!
2020-03-14T12:25:20.760643+00:00 app[web.1]: [1] npm ERR! Failed at the teachercourseapp#1.0.0 server script.
2020-03-14T12:25:20.760644+00:00 app[web.1]: [1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-14T12:25:20.769172+00:00 app[web.1]: [1]
2020-03-14T12:25:20.771168+00:00 app[web.1]: [1] npm ERR! A complete log of this run can be found in:
2020-03-14T12:25:20.771169+00:00 app[web.1]: [1] npm ERR! /app/.npm/_logs/2020-03-14T12_25_20_761Z-debug.log
2020-03-14T12:25:20.779534+00:00 app[web.1]: [1] npm run server exited with code 1
2020-03-14T12:25:21.019553+00:00 app[web.1]: [0]
2020-03-14T12:25:21.019562+00:00 app[web.1]: [0] > coursemanagement#0.1.0 start /app/client
2020-03-14T12:25:21.019563+00:00 app[web.1]: [0] > react-scripts start
2020-03-14T12:25:21.019563+00:00 app[web.1]: [0]
2020-03-14T12:25:21.024669+00:00 app[web.1]: [0] sh: 1: react-scripts: not found
2020-03-14T12:25:21.029965+00:00 app[web.1]: [0] npm ERR! code ELIFECYCLE
2020-03-14T12:25:21.029966+00:00 app[web.1]: [0] npm ERR! syscall spawn
2020-03-14T12:25:21.030363+00:00 app[web.1]: npm ERR! file sh
2020-03-14T12:25:21.030364+00:00 app[web.1]: [0] npm ERR! errno ENOENT
2020-03-14T12:25:21.031948+00:00 app[web.1]: [0] npm ERR! coursemanagement#0.1.0 start: `react-scripts start`
2020-03-14T12:25:21.031949+00:00 app[web.1]: [0] npm ERR! spawn ENOENT
2020-03-14T12:25:21.031949+00:00 app[web.1]: [0] npm ERR!
2020-03-14T12:25:21.033375+00:00 app[web.1]: npm ERR! Failed at the coursemanagement#0.1.0 start script.
2020-03-14T12:25:21.033376+00:00 app[web.1]: [0] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-14T12:25:21.037820+00:00 app[web.1]: [0] npm WARN Local package.json exists, but node_modules missing, did you mean to install?
2020-03-14T12:25:21.038198+00:00 app[web.1]: [0]
2020-03-14T12:25:21.038591+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-14T12:25:21.038592+00:00 app[web.1]: [0] npm ERR! /app/.npm/_logs/2020-03-14T12_25_21_032Z-debug.log
2020-03-14T12:25:21.047517+00:00 app[web.1]: [0] npm ERR! code ELIFECYCLE
2020-03-14T12:25:21.047518+00:00 app[web.1]: [0] npm ERR! errno 1
2020-03-14T12:25:21.048896+00:00 app[web.1]: [0] npm ERR! teachercourseapp#1.0.0 client: `cd client/src && npm start`
2020-03-14T12:25:21.048897+00:00 app[web.1]: [0] npm ERR! Exit status 1
2020-03-14T12:25:21.048897+00:00 app[web.1]: [0] npm ERR!
2020-03-14T12:25:21.049322+00:00 app[web.1]: npm ERR! Failed at the teachercourseapp#1.0.0 client script.
2020-03-14T12:25:21.049753+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-14T12:25:21.055102+00:00 app[web.1]: [0]
2020-03-14T12:25:21.055708+00:00 app[web.1]: [0] npm ERR! A complete log of this run can be found in:
2020-03-14T12:25:21.055709+00:00 app[web.1]: [0] npm ERR! /app/.npm/_logs/2020-03-14T12_25_21_050Z-debug.log
2020-03-14T12:25:21.060294+00:00 app[web.1]: [0] npm run client exited with code 1
2020-03-14T12:25:21.067946+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-03-14T12:25:21.068281+00:00 app[web.1]: npm ERR! errno 1
2020-03-14T12:25:21.069285+00:00 app[web.1]: npm ERR! teachercourseapp#1.0.0 start: `concurrently "npm run client" "npm run server" `
2020-03-14T12:25:21.069440+00:00 app[web.1]: npm ERR! Exit status 1
2020-03-14T12:25:21.069684+00:00 app[web.1]: npm ERR!
2020-03-14T12:25:21.069864+00:00 app[web.1]: npm ERR! Failed at the teachercourseapp#1.0.0 start script.
2020-03-14T12:25:21.070045+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-14T12:25:21.075605+00:00 app[web.1]:
2020-03-14T12:25:21.075900+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-14T12:25:21.076095+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-03-14T12_25_21_070Z-debug.log
2020-03-14T12:25:21.194915+00:00 heroku[web.1]: State changed from starting to crashed
2020-03-14T12:25:21.175761+00:00 heroku[web.1]: Process exited with status 1
2020-03-14T12:25:22.079114+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=managingcourses.herokuapp.com request_id=175c1aa8-0966-4493-a328-ed303e4b8075 fwd="188.123.215.228
" dyno= connect= service= status=503 bytes= protocol=https
2020-03-14T12:25:22.577434+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=managingcourses.herokuapp.com request_id=912f071c-c6c0-49ce-996d-33005e324fb1 fwd="188.
123.215.228" dyno= connect= service= status=503 bytes= protocol=https
It starts with cannot find express module, but I've reinstalled it with --save flag and nothing changes. Could you please help me try to figure this out? I'm stack for like 2 days with that error.
Following the comment, I post where the problem is:
Heroku is looking at the package.json located at the root of your project. You installed express in the server folder but the file at the root does not contain it.
Either you can push a subtree of your repository:
git subtree push --prefix path/to/subdirectory heroku master
Or just split up your server and client parts into two repositories.

Error when access to page given by heroku after a successful build of a mean stack app

there is a logs file that I get it
2017-12-02T08:12:09.990720+00:00 app[web.1]: npm ERR! npm bugs my-app
2017-12-02T08:12:09.990867+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-12-02T08:12:09.991030+00:00 app[web.1]: npm ERR! npm owner ls my-app
2017-12-02T08:12:09.991159+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-12-02T08:12:10.023279+00:00 app[web.1]:
2017-12-02T08:12:10.023508+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-12-02T08:12:10.023929+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-02T08_12_09_996Z-debug.log
2017-12-02T08:12:10.096738+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-02T08:12:10.099479+00:00 heroku[web.1]: State changed from crashed to starting
2017-12-02T08:12:12.801622+00:00 heroku[web.1]: Starting process with command npm start
2017-12-02T08:12:15.592323+00:00 app[web.1]:
2017-12-02T08:12:15.592371+00:00 app[web.1]: > my-app#0.0.0 start /app
2017-12-02T08:12:15.592373+00:00 app[web.1]:
2017-12-02T08:12:15.592372+00:00 app[web.1]: > ng serve
2017-12-02T08:12:15.597560+00:00 app[web.1]: sh: 1: ng: not found
2017-12-02T08:12:15.601930+00:00 app[web.1]:
2017-12-02T08:12:15.604876+00:00 app[web.1]: npm ERR! Linux 3.13.0-133-generic
2017-12-02T08:12:15.605094+00:00 app[web.1]: npm ERR! argv
"/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-12-02T08:12:15.605243+00:00 app[web.1]: npm ERR! node v7.9.0
2017-12-02T08:12:15.605367+00:00 app[web.1]: npm ERR! npm v4.2.0
2017-12-02T08:12:15.605609+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-02T08:12:15.605511+00:00 app[web.1]: npm ERR! file sh
2017-12-02T08:12:15.605730+00:00 app[web.1]: npm ERR! errno ENOENT
2017-12-02T08:12:15.605852+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-02T08:12:15.605960+00:00 app[web.1]: npm ERR! my-app#0.0.0 start: ng serve
2017-12-02T08:12:15.606045+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-02T08:12:15.606140+00:00 app[web.1]: npm ERR!
2017-12-02T08:12:15.606231+00:00 app[web.1]: npm ERR! Failed at the my-app#0.0.0 start script 'ng serve'.
2017-12-02T08:12:15.606317+00:00 app[web.1]: npm ERR! Make sure you have the latest version of node.js and npm installed.
2017-12-02T08:12:15.606411+00:00 app[web.1]: npm ERR! If you do, this is most likely a problem with the my-app package,
2017-12-02T08:12:15.606479+00:00 app[web.1]: npm ERR! not with npm itself.
2017-12-02T08:12:15.606564+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2017-12-02T08:12:15.606648+00:00 app[web.1]: npm ERR! ng serve
2017-12-02T08:12:15.606731+00:00 app[web.1]: npm ERR! You can get information on how to open an issue for this project with:
2017-12-02T08:12:15.606820+00:00 app[web.1]: npm ERR! npm bugs my-app
2017-12-02T08:12:15.606902+00:00 app[web.1]: npm ERR! Or if that isn't available, you can get their info via:
2017-12-02T08:12:15.606983+00:00 app[web.1]: npm ERR! npm owner ls my-app
2017-12-02T08:12:15.625719+00:00 app[web.1]:
2017-12-02T08:12:15.625890+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2017-12-02T08:12:15.607068+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2017-12-02T08:12:15.626229+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-02T08_12_15_612Z-debug.log
2017-12-02T08:12:15.719237+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-02T08:12:15.702055+00:00 heroku[web.1]: Process exited with status 1
2017-12-02T08:12:34.000000+00:00 app[api]: Build started by user re#gmail.com
2017-12-02T08:12:34.000000+00:00 app[api]: Build failed -- check your build logs
2017-12-02T08:13:41.000000+00:00 app[api]: Build started by user re#gmail.com
2017-12-02T08:13:57.303585+00:00 app[api]: Deploy b934403c by user re#gmail.com
2017-12-02T08:13:57.303585+00:00 app[api]: Release v8 created by user re#gmail.com
2017-12-02T08:13:41.000000+00:00 app[api]: Build succeeded
2017-12-02T08:13:58.043416+00:00 heroku[web.1]: State changed from crashed to starting
2017-12-02T08:14:00.695597+00:00 heroku[web.1]: Starting process with command npm start
2017-12-02T08:14:02.754000+00:00 app[web.1]:
2017-12-02T08:14:02.754019+00:00 app[web.1]: > my-app#0.0.0 start /app
2017-12-02T08:14:02.754020+00:00 app[web.1]: > ng serve
2017-12-02T08:14:02.754021+00:00 app[web.1]:
2017-12-02T08:14:02.758257+00:00 app[web.1]: sh: 1: ng: not found
2017-12-02T08:14:02.760852+00:00 app[web.1]: npm ERR! file sh
2017-12-02T08:14:02.761025+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-02T08:14:02.761175+00:00 app[web.1]: npm ERR! errno ENOENT
2017-12-02T08:14:02.761287+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-02T08:14:02.762231+00:00 app[web.1]: npm ERR! my-app#0.0.0 start: ng serve
2017-12-02T08:14:02.762294+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-02T08:14:02.762466+00:00 app[web.1]: npm ERR!
2017-12-02T08:14:02.762549+00:00 app[web.1]: npm ERR! Failed at the my-app#0.0.0 start script.
2017-12-02T08:14:02.762640+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-12-02T08:14:02.768294+00:00 app[web.1]:
2017-12-02T08:14:02.768421+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2017-12-02T08:14:02.768493+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-02T08_14_02_763Z-debug.log
2017-12-02T08:14:02.838392+00:00 heroku[web.1]: Process exited with status 1
2017-12-02T08:14:02.851871+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-02T08:15:31.370982+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-lowlands-73030.herokuapp.com
request_id=603bf5e0-1b2b-4b34-a016-b5be382f3556 fwd="105.144.187.15" dyno= connect= service= status=503 bytes= protocol=https
2017-12-02T08:15:32.474243+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dry-lowlands-73030.herokuapp.com request_id=73f09d87-c20a-476b-b7cc-f7830c97b767 fwd="105.144.187.15" dyno= connect= service= status=503 bytes= protocol=https
2017-12-02T08:18:40.000000+00:00 app[api]: Build started by user re#gmail.com
2017-12-02T08:18:40.000000+00:00 app[api]: Build failed -- check your build logs
2017-12-02T08:21:19.000000+00:00 app[api]: Build started by user re#gmail.com
2017-12-02T08:21:33.835951+00:00 app[api]: Release v9 created by user re#gmail.com
2017-12-02T08:21:33.835951+00:00 app[api]: Deploy 4e6ea883 by user re#gmail.com
2017-12-02T08:21:34.328617+00:00 heroku[web.1]: State changed from crashed to starting
2017-12-02T08:21:19.000000+00:00 app[api]: Build succeeded
2017-12-02T08:21:37.664113+00:00 heroku[web.1]: Starting process with command npm start
2017-12-02T08:21:42.152085+00:00 app[web.1]:
2017-12-02T08:21:42.152123+00:00 app[web.1]: > my-app#0.0.0 start /app
2017-12-02T08:21:42.152124+00:00 app[web.1]: > ng serve
2017-12-02T08:21:42.152124+00:00 app[web.1]:
2017-12-02T08:21:42.164295+00:00 app[web.1]: sh: 1: ng: not found
2017-12-02T08:21:42.169858+00:00 app[web.1]: npm ERR! file sh
2017-12-02T08:21:42.170296+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2017-12-02T08:21:42.170752+00:00 app[web.1]: npm ERR! errno ENOENT
2017-12-02T08:21:42.171236+00:00 app[web.1]: npm ERR! syscall spawn
2017-12-02T08:21:42.173965+00:00 app[web.1]: npm ERR! my-app#0.0.0 start: ng serve
2017-12-02T08:21:42.174165+00:00 app[web.1]: npm ERR! spawn ENOENT
2017-12-02T08:21:42.174630+00:00 app[web.1]: npm ERR!
2017-12-02T08:21:42.174867+00:00 app[web.1]: npm ERR! Failed at the my-app#0.0.0 start script.
2017-12-02T08:21:42.175064+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2017-12-02T08:21:42.185175+00:00 app[web.1]:
2017-12-02T08:21:42.185419+00:00 app[web.1]: npm ERR! A complete log of this run can be found in
2017-12-02T08:21:42.185565+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2017-12-02T08_21_42_176Z-debug.log
2017-12-02T08:21:42.317965+00:00 heroku[web.1]: State changed from starting to crashed
2017-12-02T08:21:42.304608+00:00 heroku[web.1]: Process exited with status 1
2017-12-02T08:23:35.486753+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=dry-lowlands-73030.herokuapp.com request_id=b3671dce-3610-47d8-abfa-357c63e329ee fwd="105.144.187.15" dyno= connect= service= status=503 bytes= protocol=https
2017-12-02T08:23:36.383415+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=dry-lowlands-73030.herokuapp.com request_id=1b80ed67-ca00-411b-832c-62812a756f39 fwd="105.144.187.15" dyno= connect= service= status=503 bytes= protocol=https
Hi try these configurations in your package.json,
Try to avoid ng serve for production.
Use http-serve instead
"scripts": {
"postinstall": "ng build --no-progress -prod --build-optimizer=false",
"ng": "ng",
"start": "http-server ./dist/",
"start:hmr": "ng serve --hmr",
"start:aot": "ng serve --aot",
"start:prod": "ng serve --prod",
"start:prod:aot": "ng serve --prod",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"preinstall": "rm -rf node_modules package-lock.json && npm install -g http-server #angular/cli#1.5.5"
}

NodeJS Heroku Deploying Error

When I was deploying my app to Heroku from github, on my Heroku dashboard it says my app is successfully deployed. However, when I view my app it says Application Error.
So here is my log:
2015-09-09T05:54:41.566570+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-09T05:54:41.566570+00:00 heroku[web.1]: State changed from crashed to starting
2015-09-09T05:54:41.542661+00:00 heroku[web.1]: Process exited with status 1
2015-09-09T05:54:43.511445+00:00 heroku[web.1]: Starting process with command `npm start`
2015-09-09T05:54:45.973805+00:00 app[web.1]:
2015-09-09T05:54:45.973825+00:00 app[web.1]: > mark-wen-home#1.0.0 start /app
2015-09-09T05:54:45.973828+00:00 app[web.1]: > node server.js
2015-09-09T05:54:45.973829+00:00 app[web.1]:
2015-09-09T05:54:46.306616+00:00 app[web.1]: events.js:85
2015-09-09T05:54:46.306620+00:00 app[web.1]: throw er; // Unhandled 'error' event
2015-09-09T05:54:46.306621+00:00 app[web.1]: ^
2015-09-09T05:54:46.306623+00:00 app[web.1]: Error: listen EACCES
2015-09-09T05:54:46.306624+00:00 app[web.1]: at exports._errnoException (util.js:746:11)
2015-09-09T05:54:46.306625+00:00 app[web.1]: at Server._listen2 (net.js:1139:19)
2015-09-09T05:54:46.306626+00:00 app[web.1]: at listen (net.js:1182:10)
2015-09-09T05:54:46.306628+00:00 app[web.1]: at Server.listen (net.js:1267:5)
2015-09-09T05:54:46.306629+00:00 app[web.1]: at EventEmitter.listen (/app/node_modules/express/lib/application.js:617:24)
2015-09-09T05:54:46.306630+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:6:18)
2015-09-09T05:54:46.306631+00:00 app[web.1]: at Module._compile (module.js:460:26)
2015-09-09T05:54:46.306633+00:00 app[web.1]: at Object.Module._extensions..js (module.js:478:10)
2015-09-09T05:54:46.306634+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-09-09T05:54:46.306635+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-09-09T05:54:46.319744+00:00 app[web.1]:
2015-09-09T05:54:46.325322+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-09-09T05:54:46.325562+00:00 app[web.1]: npm ERR! node v0.12.7
2015-09-09T05:54:46.325986+00:00 app[web.1]: npm ERR! npm v2.11.3
2015-09-09T05:54:46.326180+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-09-09T05:54:46.326474+00:00 app[web.1]: npm ERR! mark-wen-home#1.0.0 start: `node server.js`
2015-09-09T05:54:46.326627+00:00 app[web.1]: npm ERR! Exit status 1
2015-09-09T05:54:46.326774+00:00 app[web.1]: npm ERR!
2015-09-09T05:54:46.326914+00:00 app[web.1]: npm ERR! Failed at the mark-wen-home#1.0.0 start script 'node server.js'.
2015-09-09T05:54:46.327140+00:00 app[web.1]: npm ERR! This is most likely a problem with the mark-wen-home package,
2015-09-09T05:54:46.327330+00:00 app[web.1]: npm ERR! not with npm itself.
2015-09-09T05:54:46.327495+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-09-09T05:54:46.327804+00:00 app[web.1]: npm ERR! node server.js
2015-09-09T05:54:46.327908+00:00 app[web.1]: npm ERR! You can get their info via:
2015-09-09T05:54:46.328139+00:00 app[web.1]: npm ERR! npm owner ls mark-wen-home
2015-09-09T05:54:46.328335+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-09-09T05:54:46.331322+00:00 app[web.1]:
2015-09-09T05:54:46.331590+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-09-09T05:54:46.331796+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2015-09-09T05:54:46.324727+00:00 app[web.1]: npm ERR! Linux 3.13.0-61-generic
2015-09-09T05:54:47.275838+00:00 heroku[web.1]: State changed from starting to crashed
2015-09-09T05:54:47.256020+00:00 heroku[web.1]: Process exited with status 1
2015-09-09T06:02:13.416277+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mark-wen-home.herokuapp.com request_id=1ef25e3b-07c1-4d3c-b076-1340b63418b9 fwd="72.12.205.35" dyno= connect= service= status=503 bytes=
2015-09-09T06:02:13.809318+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mark-wen-home.herokuapp.com request_id=8a4ba90e-6596-40e7-a5a0-72f829a5b90f fwd="72.12.205.35" dyno= connect= service= status=503 bytes=
And here is my server.js in case it is needed:
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/public'));
var server = app.listen(80, function () {
var port = server.address().port;
console.log('Listening at port ' + port);
});
I am new to Heroku, please help me out with this, thanks.
instead of 80, try to use like this (process.env.PORT || 80))
Common issue, try this.
Add a file in your app's root directory: Procfile
It has no extensions, just Procfile
And in this Procfile, add the following
web: node ./bin/www
Recompile and repush, let us know what happens.

Node.js application on Heroku: failed with exit status 8 - application-name package?

2014-08-18T06:12:54.374054+00:00 app[web.1]: npm ERR! node app.js
2014-08-18T06:12:54.374153+00:00 app[web.1]: npm ERR! You can get their info via:
2014-08-18T06:12:53.681620+00:00 app[web.1]:
2014-08-18T06:12:53.681638+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-08-18T06:12:53.681641+00:00 app[web.1]: > node app.js
2014-08-18T06:12:53.681642+00:00 app[web.1]:
2014-08-18T09:08:41.257725+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2014-08-18T09:08:41.258006+00:00 app[web.1]: npm ERR! npm owner ls application-name
2014-08-18T09:08:41.257553+00:00 app[web.1]: npm ERR! This is most likely a problem with the application-name package,
2014-08-18T09:08:41.200012+00:00 app[web.1]:
2014-08-18T09:08:41.256092+00:00 app[web.1]: npm ERR! Failed at the application-name#0.0.1 start script.
2014-08-18T09:08:41.328006+00:00 app[web.1]: npm ERR! not ok code 0
2014-08-18T09:08:41.257897+00:00 app[web.1]: npm ERR! You can get their info via:
2014-08-18T09:08:41.255669+00:00 app[web.1]: npm ERR! application-name#0.0.1 start: `node app.js`
2014-08-18T09:08:41.256012+00:00 app[web.1]: npm ERR!
2014-08-18T09:08:41.255860+00:00 app[web.1]: npm ERR! Exit status 8
2014-08-18T09:08:41.260452+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2014-08-18T09:08:41.257637+00:00 app[web.1]: npm ERR! not with npm itself.
2014-08-18T09:08:41.305747+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start"
2014-08-18T09:08:41.257819+00:00 app[web.1]: npm ERR! node app.js
2014-08-18T1
5:48:38.818790+00:00 app[web.1]: Error: Most middleware (like json) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.
2014-08-18T15:48:38.818796+00:00 app[web.1]: at Function.Object.defineProperty.get (/app/node_modules/express/lib/express.js:89:13)
2014-08-18T15:48:38.818798+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:37:17)
2014-08-18T15:48:38.818800+00:00 app[web.1]: at Module._compile (module.js:456:26)
2014-08-18T15:48:38.818802+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2014-08-18T15:48:38.818803+00:00 app[web.1]: at Module.load (module.js:356:32)
2014-08-18T15:48:38.818804+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2014-08-18T15:48:38.818806+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-08-18T15:48:38.818808+00:00 app[web.1]: at startup (node.js:119:16)
2014-08-18T15:48:38.818809+00:00 app[web.1]: at node.js:906:3
2014-08-18T15:48:38.852005+00:00 app[web.1]:
2014-08-18T15:48:38.963950+00:00 app[web.1]: npm ERR! Exit status 8
2014-08-18T15:48:38.964092+00:00 app[web.1]: npm ERR!
2014-08-18T15:48:38.964243+00:00 app[web.1]: npm ERR! Failed at the application-name#0.0.1 start script.
2014-08-18T15:48:38.964845+00:00 app[web.1]: npm ERR! This is most likely a problem with the application-name package,
2014-08-18T15:48:38.964941+00:00 app[web.1]: npm ERR! not with npm itself.
2014-08-18T15:48:38.965068+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2014-08-18T15:48:38.972537+00:00 app[web.1]: npm ERR! node app.js
2014-08-18T15:48:38.972644+00:00 app[web.1]: npm ERR! You can get their info via:
2014-08-18T15:48:38.972791+00:00 app[web.1]: npm ERR! npm owner ls application-name
2014-08-18T15:48:38.972864+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2014-08-18T15:48:39.003054+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2
2014-08-18T15:48:39.003239+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start"
2014-08-18T15:48:39.003377+00:00 app[web.1]: npm ERR! cwd /app
2014-08-18T15:48:39.034280+00:00 app[web.1]: npm ERR! node -v v0.10.30
2014-08-18T15:48:39.034505+00:00 app[web.1]: npm ERR! npm -v 1.4.21
2014-08-18T15:48:39.034627+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-08-18T15:48:39.053234+00:00 app[web.1]: npm ERR!
2014-08-18T15:48:39.053356+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2014-08-18T15:48:39.053445+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2014-08-18T15:48:39.053666+00:00 app[web.1]: npm ERR! not ok code 0
2014-08-18T15:48:34.297578+00:00 app[web.1]:
2014-08-18T15:48:34.297596+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-08-18T15:48:34.297598+00:00 app[web.1]: > node app.js
2014-08-18T15:48:34.297599+00:00 app[web.1]:
2014-08-18T15:48:38.807843+00:00 app[web.1]:
2014-08-18T15:48:38.963600+00:00 app[web.1]: npm ERR! application-name#0.0.1 start: `node app.js`
2014-08-19T01:18:03.335113+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/robots.txt" host=www.supercuber.com request_id=2a27f766-9eba-4b64-a2eb-be9d666cbc6f fwd="208.115.111.73" dyno= connect= service= status=503 bytes=
2014-08-19T06:27:09.423387+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=supercuber.com request_id=cc9ecb87-a01f-4d75-97c9-83327bc0ea12 fwd="188.40.249.84" dyno= connect= service= status=503 bytes=
2014-08-19T07:29:59.457621+00:00 heroku[web.1]: State changed from crashed to starting
2014-08-19T07:30:05.636929+00:00 app[web.1]:
2014-08-19T07:30:05.636950+00:00 app[web.1]:
2014-08-19T07:30:05.636947+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-08-19T07:30:06.272653+00:00 app[web.1]: npm ERR! This is most likely a problem with the application-name package,
2014-08-19T07:30:06.274102+00:00 app[web.1]: npm ERR! node -v v0.10.30
2014-08-19T07:30:06.272136+00:00 app[web.1]: npm ERR! Failed at the application-name#0.0.1 start script.
2014-08-19T07:30:06.274218+00:00 app[web.1]: npm ERR! npm -v 1.4.21
2014-08-19T07:30:06.251287+00:00 app[web.1]:
2014-08-19T07:30:06.273691+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2
2014-08-19T07:30:06.275894+00:00 app[web.1]: npm ERR!
2014-08-19T07:30:06.273411+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2014-08-19T07:30:06.276020+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2014-08-19T07:30:06.272036+00:00 app[web.1]: npm ERR!
2014-08-19T07:30:06.273990+00:00 app[web.1]: npm ERR! cwd /app
2014-08-19T07:30:05.636949+00:00 app[web.1]: > node app.js
2014-08-19T07:30:06.273008+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2014-08-19T07:30:06.273285+00:00 app[web.1]: npm ERR! npm owner ls application-name
2014-08-19T07:30:06.276125+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2014-08-19T07:30:06.273186+00:00 app[web.1]: npm ERR! You can get their info via:
2014-08-19T07:30:06.274337+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-08-19T07:30:06.271697+00:00 app[web.1]: npm ERR! application-name#0.0.1 start: `node app.js`
2014-08-19T07:30:06.272746+00:00 app[web.1]: npm ERR! not with npm itself.
2014-08-19T07:30:06.273099+00:00 app[web.1]: npm ERR! node app.js
2014-08-19T07:30:06.271900+00:00 app[web.1]: npm ERR! Exit status 8
2014-08-19T07:30:06.273861+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start"
2014-08-19T07:30:07.487403+00:00 heroku[web.1]: State changed from starting to crashed
2014-08-19T13:13:46.311103+00:00 heroku[web.1]: Process exited with status 1
2014-08-19T13:13:43.465194+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-20T01:13:05.625215+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/BingSiteAuth.xml" host=www.supercuber.com request_id=60a05958-5b68-45b3-896d-4ffda351783e fwd="131.253.38.67" dyno= connect= service= status=503 bytes=
2014-08-20T01:13:05.480594+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www.supercuber.com request_id=4ff53541-8a8d-43b6-a39c-db40924c9eac fwd="131.253.38.67" dyno= connect= service= status=503 bytes=
2014-08-20T02:43:17.133291+00:00 app[web.1]: > node app.js
2014-08-20T02:43:17.133270+00:00 app[web.1]:
2014-08-20T02:43:17.133292+00:00 app[web.1]:
2014-08-20T02:43:17.133289+00:00 app[web.1]: > application-name#0.0.1 start /app
2014-08-20T02:43:17.732000+00:00 app[web.1]: npm ERR!
2014-08-20T02:43:17.732121+00:00 app[web.1]: npm ERR! Failed at the application-name#0.0.1 start script.
2014-08-20T02:43:17.710159+00:00 app[web.1]:
2014-08-20T02:43:17.731539+00:00 app[web.1]: npm ERR! application-name#0.0.1 start: `node app.js`
2014-08-20T02:43:17.731795+00:00 app[web.1]: npm ERR! Exit status 8
2014-08-20T02:43:17.733311+00:00 app[web.1]: npm ERR! This is most likely a problem with the application-name package,
2014-08-20T03:10:55.501614+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www.supercuber.com request_id=7ed9a3bd-755c-4d7b-bc23-1a3fa2152919 fwd="98.182.28.116" dyno= connect= service= status=503 bytes=
This is what gets output in my application logs that the error code tells me to check. My research online and here on stack overflow has shown that this error seems to appear for a large variety of use cases, and Im not sure why its appearing now? My application runs fine locally. In fact it used to run on heroku, except when I just made new changes and tried to push them to heroku this happens when I try and start the app.
Edit: here is whats in my app.js currently:
var bodyParser = require('body-parser');
var methodOverride = require('method-override');
var cookieParser = require('cookie-parser');
app.use(bodyParser());
app.use(methodOverride());
app.use(cookieParser());
npm is telling you what's wrong:
2014-08-18T15:48:38.818790+00:00 app[web.1]: Error: Most middleware (like json) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.
2014-08-18T15:48:38.818796+00:00 app[web.1]: at Function.Object.defineProperty.get (/app/node_modules/express/lib/express.js:89:13)
2014-08-18T15:48:38.818798+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:37:17)
2014-08-18T15:48:38.818800+00:00 app[web.1]: at Module._compile (module.js:456:26)
2014-08-18T15:48:38.818802+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2014-08-18T15:48:38.818803+00:00 app[web.1]: at Module.load (module.js:356:32)
2014-08-18T15:48:38.818804+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2014-08-18T15:48:38.818806+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-08-18T15:48:38.818808+00:00 app[web.1]: at startup (node.js:119:16)
2014-08-18T15:48:38.818809+00:00 app[web.1]: at node.js:906:3
If you're using express 4.x.x, you must require the middleware separately.
For example, if you are using express.bodyParser(), you will need to replace it by performing the following steps:
Run npm install body-parser --save
Add this require near the top of your page with your require statements: var bodyParser = require('body-parser');
Find in your app:
app.use(express.bodyParser());
app.use(express.urlencoded());
app.use(express.json());
Replace ALL with this ONE line: app.use(bodyParser());
You must then complete these steps for all the other middleware your application uses and is listed on connect's migration guide.

Resources