I've gotten the dreaded, generic "Application Error" on Heroku and I don't know what the problem is. My application was made with Node.js, Javascript, and jQuery.
I've checked the Heroku log, but I don't fully understand what I'm looking at. There seems to be a plethora of different errors, and I can't pinpoint what it is I need to change. Any ideas are welcome. Here's a copy of the log:
2014-07-26T06:31:19.057389+00:00 app[web.1]: npm ERR!
2014-07-26T06:31:19.055089+00:00 app[web.1]: npm ERR! cwd /app
2014-07-26T06:31:19.055336+00:00 app[web.1]: npm ERR! node -v v0.10.29
2014-07-26T06:31:19.055561+00:00 app[web.1]: npm ERR! npm -v 1.4.14
2014-07-26T06:31:19.055777+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-07-26T06:31:19.058027+00:00 app[web.1]: npm ERR! not ok code 0
2014-07-26T06:31:20.409658+00:00 heroku[web.1]: State changed from starting to c
rashed
2014-07-26T06:31:17.392259+00:00 heroku[web.1]: Starting process with command `n
pm start`
2014-07-26T06:31:20.395955+00:00 heroku[web.1]: Process exited with status 1
2014-07-26T18:56:08.574244+00:00 heroku[web.1]: State changed from crashed to st
arting
2014-07-26T18:56:11.321689+00:00 app[web.1]: npm ERR! word_wars@0.0.0 start: `no
de server.js`
2014-07-26T18:56:11.321848+00:00 app[web.1]: npm ERR! Exit status 8
2014-07-26T18:56:11.322005+00:00 app[web.1]: npm ERR!
2014-07-26T18:56:11.322193+00:00 app[web.1]: npm ERR! Failed at the word_wars@0.
0.0 start script.
2014-07-26T18:56:11.323179+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2014-07-26T18:56:11.323078+00:00 app[web.1]: npm ERR! not with npm itself.
2014-07-26T18:56:11.323501+00:00 app[web.1]: npm ERR! npm owner ls word_wars
2014-07-26T18:56:11.322887+00:00 app[web.1]: npm ERR! This is most likely a prob
lem with the word_wars package,
2014-07-26T18:56:11.323288+00:00 app[web.1]: npm ERR! node server.js
2014-07-26T18:56:11.323362+00:00 app[web.1]: npm ERR! You can get their info via
:
2014-07-26T18:56:11.324244+00:00 app[web.1]: npm ERR! cwd /app
2014-07-26T18:56:11.323554+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2014-07-26T18:56:11.324129+00:00 app[web.1]: npm ERR! command "/app/vendor/node/
bin/node" "/app/vendor/node/bin/npm" "start"
2014-07-26T18:56:11.323946+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2
2014-07-26T18:56:11.324749+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-07-26T18:56:11.324409+00:00 app[web.1]: npm ERR! node -v v0.10.29
2014-07-26T18:56:11.324534+00:00 app[web.1]: npm ERR! npm -v 1.4.14
2014-07-26T18:56:11.125174+00:00 app[web.1]:
2014-07-26T18:56:11.125190+00:00 app[web.1]: > word_wars@0.0.0 start /app
2014-07-26T18:56:11.125193+00:00 app[web.1]:
2014-07-26T18:56:11.306402+00:00 app[web.1]:
2014-07-26T18:56:11.306746+00:00 app[web.1]: ^
2014-07-26T18:56:11.308099+00:00 app[web.1]: Error: Cannot find module 'socket.i
o'
2014-07-26T18:56:11.125192+00:00 app[web.1]: > node server.js
2014-07-26T18:56:11.306487+00:00 app[web.1]: module.js:340
2014-07-26T18:56:11.306728+00:00 app[web.1]: throw err;
2014-07-26T18:56:11.308102+00:00 app[web.1]: at Function.Module._resolveFile
name (module.js:338:15)
2014-07-26T18:56:11.308103+00:00 app[web.1]: at Function.Module._load (modul
e.js:280:25)
2014-07-26T18:56:11.308106+00:00 app[web.1]: at require (module.js:380:17)
2014-07-26T18:56:11.308108+00:00 app[web.1]: at Object.<anonymous> (/app/ser
ver.js:7:15)
2014-07-26T18:56:11.308110+00:00 app[web.1]: at Object.Module._extensions..j
s (module.js:474:10)
2014-07-26T18:56:11.308112+00:00 app[web.1]: at Module.load (module.js:356:3
2)
2014-07-26T18:56:11.308104+00:00 app[web.1]: at Module.require (module.js:36
4:17)
2014-07-26T18:56:11.315204+00:00 app[web.1]:
2014-07-26T18:56:11.326540+00:00 app[web.1]: npm ERR! Additional logging details
can be found in:
2014-07-26T18:56:11.326624+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2014-07-26T18:56:11.326806+00:00 app[web.1]: npm ERR! not ok code 0
2014-07-26T18:56:11.308109+00:00 app[web.1]: at Module._compile (module.js:4
56:26)
2014-07-26T18:56:11.308113+00:00 app[web.1]: at Function.Module._load (modul
e.js:312:12)
2014-07-26T18:56:11.308114+00:00 app[web.1]: at Function.Module.runMain (mod
ule.js:497:10)
2014-07-26T18:56:11.326388+00:00 app[web.1]: npm ERR!
2014-07-26T18:56:09.978419+00:00 heroku[web.1]: Starting process with command `n
pm start`
2014-07-26T18:56:12.448392+00:00 heroku[web.1]: State changed from starting to c
rashed
2014-07-26T18:56:12.440355+00:00 heroku[web.1]: Process exited with status 1
2014-07-28T00:42:37.999068+00:00 heroku[web.1]: State changed from crashed to st
arting
2014-07-28T00:42:41.106640+00:00 app[web.1]:
2014-07-28T00:42:41.106660+00:00 app[web.1]: > word_wars@0.0.0 start /app
2014-07-28T00:42:41.106663+00:00 app[web.1]:
2014-07-28T00:42:41.106662+00:00 app[web.1]: > node server.js
2014-07-28T00:42:41.329192+00:00 app[web.1]:
2014-07-28T00:42:41.329283+00:00 app[web.1]: module.js:340
2014-07-28T00:42:41.329529+00:00 app[web.1]: ^
2014-07-28T00:42:41.329507+00:00 app[web.1]: throw err;
2014-07-28T00:42:41.331018+00:00 app[web.1]: at Function.Module._resolveFile
name (module.js:338:15)
2014-07-28T00:42:41.331015+00:00 app[web.1]: Error: Cannot find module 'socket.i
o'
2014-07-28T00:42:41.331020+00:00 app[web.1]: at Function.Module._load (modul
e.js:280:25)
2014-07-28T00:42:41.331021+00:00 app[web.1]: at Module.require (module.js:36
4:17)
2014-07-28T00:42:41.331025+00:00 app[web.1]: at Object.<anonymous> (/app/ser
ver.js:7:15)
2014-07-28T00:42:41.331027+00:00 app[web.1]: at Object.Module._extensions..j
s (module.js:474:10)
2014-07-28T00:42:41.331026+00:00 app[web.1]: at Module._compile (module.js:4
56:26)
2014-07-28T00:42:41.331023+00:00 app[web.1]: at require (module.js:380:17)
2014-07-28T00:42:41.331031+00:00 app[web.1]: at Function.Module.runMain (mod
ule.js:497:10)
2014-07-28T00:42:41.339558+00:00 app[web.1]:
2014-07-28T00:42:41.331029+00:00 app[web.1]: at Module.load (module.js:356:3
2)
2014-07-28T00:42:41.331030+00:00 app[web.1]: at Function.Module._load (modul
e.js:312:12)
2014-07-28T00:42:41.346854+00:00 app[web.1]: npm ERR! word_wars@0.0.0 start: `no
de server.js`
2014-07-28T00:42:41.348910+00:00 app[web.1]: npm ERR! npm owner ls word_wars
2014-07-28T00:42:41.347995+00:00 app[web.1]: npm ERR! This is most likely a prob
lem with the word_wars package,
2014-07-28T00:42:41.348076+00:00 app[web.1]: npm ERR! not with npm itself.
2014-07-28T00:42:41.349917+00:00 app[web.1]: npm ERR! npm -v 1.4.14
2014-07-28T00:42:41.347250+00:00 app[web.1]: npm ERR!
2014-07-28T00:42:41.347091+00:00 app[web.1]: npm ERR! Exit status 8
2014-07-28T00:42:41.348289+00:00 app[web.1]: npm ERR! node server.js
2014-07-28T00:42:41.352195+00:00 app[web.1]: npm ERR! not ok code 0
2014-07-28T00:42:41.348792+00:00 app[web.1]: npm ERR! You can get their info via
:
2014-07-28T00:42:41.347366+00:00 app[web.1]: npm ERR! Failed at the word_wars@0.
0.0 start script.
2014-07-28T00:42:41.349410+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2
2014-07-28T00:42:41.349673+00:00 app[web.1]: npm ERR! cwd /app
2014-07-28T00:42:41.348173+00:00 app[web.1]: npm ERR! Tell the author that this
fails on your system:
2014-07-28T00:42:41.349017+00:00 app[web.1]: npm ERR! There is likely additional
logging output above.
2014-07-28T00:42:41.349541+00:00 app[web.1]: npm ERR! command "/app/vendor/node/
bin/node" "/app/vendor/node/bin/npm" "start"
2014-07-28T00:42:41.349792+00:00 app[web.1]: npm ERR! node -v v0.10.29
2014-07-28T00:42:41.350040+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-07-28T00:42:41.351898+00:00 app[web.1]: npm ERR! Additional logging details
can be found in:
2014-07-28T00:42:41.351808+00:00 app[web.1]: npm ERR!
2014-07-28T00:42:41.352020+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2014-07-28T00:42:42.645541+00:00 heroku[web.1]: State changed from starting to c
rashed
2014-07-28T00:42:42.640926+00:00 heroku[web.1]: Process exited with status 1
2014-07-28T00:42:39.698349+00:00 heroku[web.1]: Starting process with command `n
pm start`
2014-07-28T03:20:33.915564+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=pacific-chamber-2056.herokuapp.com request_id=bb8
8cd66-ada8-4ea0-97c1-f25e806778e4 fwd="67.161.107.24" dyno= connect= service= st
atus=503 bytes=
2014-07-28T03:20:34.433888+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=pacific-chamber-2056.herokuapp.com req
uest_id=a01059e2-e7d2-4ce2-a62c-77541448537f fwd="67.161.107.24" dyno= connect=
service= status=503 bytes=
It's been suggested that socket.io has something to do with the problem, but it is listed as a dependency. Here's what the package.json looks like:
{
"name": "word_wars",
"version": "0.0.0",
"description": "A Scrabble-like game with some unique features. Made as a project for Code Fellows.",
"main": "server.js",
"repository": {
"type": "git",
"url": "https://github.com/Eye-Static/word_wars.git"
},
"keywords": [
"scrabble",
"code-fellows"
],
"author": "Eye Static",
"license": "ISC",
"dependencies": {
"express": "^4.4.3"
},
"devDependencies": {
"browserify": "^4.1.10",
"chai": "^1.9.1",
"debowerify": "^0.7.1",
"grunt": "^0.4.5",
"grunt-browserify": "^2.1.0",
"grunt-casper": "^0.3.9",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-express-server": "^0.4.17",
"grunt-mocha-test": "^0.11.0",
"grunt-simple-mocha": "^0.4.0",
"handlebars": "^1.3.0",
"hbsfy": "^1.3.2",
"matchdep": "^0.3.0",
"socket.io": "^1.0.6",
"uglifyify": "^2.5.0"
}
}
Error: Cannot find module 'socket.io' is keeping your app from starting.
What does your package.json look like?
We never did figure out what was wrong with our Heroku upload, but the resolution was to simply host it on our own website. The application runs beautifully and we don't have to deal with all of Heroku's weird errors, dynamos, and other aspects that we don't fully understand.