0

I'm attempting to deploy to Heroku. The build finishes, but I get the dreaded Application Error page when trying to access the deployed Heroku URL of my application. For the record, the application works just fine locally.

heroku logs shows:

2015-01-18T23:52:20.823001+00:00 heroku[api]: Release v2 created by sean1rose@gmail.com
2015-01-18T23:52:20.822954+00:00 heroku[api]: Enable Logplex by sean1rose@gmail.com
2015-01-18T23:54:34.426987+00:00 heroku[api]: Scale to web=1 by sean1rose@gmail.com
2015-01-18T23:54:34.521785+00:00 heroku[api]: Deploy 1289891 by sean1rose@gmail.com
2015-01-18T23:54:34.521867+00:00 heroku[api]: Release v3 created by sean1rose@gmail.com
2015-01-18T23:54:36.381434+00:00 heroku[web.1]: Starting process with command `npm start`
2015-01-18T23:54:38.190134+00:00 app[web.1]: 
2015-01-18T23:54:38.190156+00:00 app[web.1]: > node server/app.js
2015-01-18T23:54:38.190154+00:00 app[web.1]: > lost-paws@0.0.0 start /app
2015-01-18T23:54:38.190157+00:00 app[web.1]: 
2015-01-18T23:54:38.883490+00:00 app[web.1]: npm ERR!     node server/app.js
2015-01-18T23:54:38.883593+00:00 app[web.1]: npm ERR! You can get their info via:
2015-01-18T23:54:38.882060+00:00 app[web.1]: npm ERR! lost-paws@0.0.0 start: `node server/app.js`
2015-01-18T23:54:38.882457+00:00 app[web.1]: npm ERR! 
2015-01-18T23:54:38.882300+00:00 app[web.1]: npm ERR! Exit status 8
2015-01-18T23:54:38.882569+00:00 app[web.1]: npm ERR! Failed at the lost-paws@0.0.0 start script.
2015-01-18T23:54:38.883070+00:00 app[web.1]: npm ERR! not with npm itself.
2015-01-18T23:54:38.882965+00:00 app[web.1]: npm ERR! This is most likely a problem with the lost-paws package,
2015-01-18T23:54:38.883703+00:00 app[web.1]: npm ERR!     npm owner ls lost-paws
2015-01-18T23:54:38.883167+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-01-18T23:54:38.887400+00:00 app[web.1]: npm ERR! 
2015-01-18T23:54:38.861184+00:00 app[web.1]: 
2015-01-18T23:54:38.861277+00:00 app[web.1]: module.js:340
2015-01-18T23:54:38.883807+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-01-18T23:54:38.861572+00:00 app[web.1]:     throw err;
2015-01-18T23:54:38.884623+00:00 app[web.1]: npm ERR! System Linux 3.13.0-40-generic
2015-01-18T23:54:38.861580+00:00 app[web.1]:           ^
2015-01-18T23:54:38.863065+00:00 app[web.1]: Error: Cannot find module 'connect-livereload'
2015-01-18T23:54:38.863067+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2015-01-18T23:54:38.863069+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2015-01-18T23:54:38.863070+00:00 app[web.1]:     at Module.require (module.js:364:17)
2015-01-18T23:54:38.863072+00:00 app[web.1]:     at require (module.js:380:17)
2015-01-18T23:54:38.863074+00:00 app[web.1]:     at module.exports (/app/server/config/express.js:39:13)
2015-01-18T23:54:38.885062+00:00 app[web.1]: npm ERR! node -v v0.10.35
2015-01-18T23:54:38.863076+00:00 app[web.1]:     at Object.<anonymous> (/app/server/app.js:28:28)
2015-01-18T23:54:38.885212+00:00 app[web.1]: npm ERR! npm -v 1.4.28
2015-01-18T23:54:38.863079+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2015-01-18T23:54:38.863077+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2015-01-18T23:54:38.884792+00:00 app[web.1]: npm ERR! command "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-01-18T23:54:38.884928+00:00 app[web.1]: npm ERR! cwd /app
2015-01-18T23:54:38.887502+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2015-01-18T23:54:38.863081+00:00 app[web.1]:     at Module.load (module.js:356:32)
2015-01-18T23:54:38.863082+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2015-01-18T23:54:38.885344+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-01-18T23:54:38.887616+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-01-18T23:54:38.875786+00:00 app[web.1]: 
2015-01-18T23:54:38.887876+00:00 app[web.1]: npm ERR! not ok code 0
2015-01-18T23:54:39.719402+00:00 heroku[web.1]: Process exited with status 1
2015-01-18T23:54:39.735314+00:00 heroku[web.1]: State changed from starting to crashed
2015-01-18T23:54:39.736471+00:00 heroku[web.1]: State changed from crashed to starting
2015-01-18T23:54:41.638699+00:00 heroku[web.1]: Starting process with command `npm start`
2015-01-18T23:54:44.176575+00:00 app[web.1]: 
2015-01-18T23:54:44.176597+00:00 app[web.1]: > lost-paws@0.0.0 start /app
2015-01-18T23:54:44.176600+00:00 app[web.1]: > node server/app.js
2015-01-18T23:54:44.176602+00:00 app[web.1]: 
2015-01-18T23:54:44.944454+00:00 app[web.1]: 
2015-01-18T23:54:44.944563+00:00 app[web.1]: module.js:340
2015-01-18T23:54:44.944893+00:00 app[web.1]:     throw err;
2015-01-18T23:54:44.946523+00:00 app[web.1]: Error: Cannot find module 'connect-livereload'
2015-01-18T23:54:44.946527+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2015-01-18T23:54:44.944904+00:00 app[web.1]:           ^
2015-01-18T23:54:44.946529+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2015-01-18T23:54:44.946530+00:00 app[web.1]:     at Module.require (module.js:364:17)
2015-01-18T23:54:44.946534+00:00 app[web.1]:     at module.exports (/app/server/config/express.js:39:13)
2015-01-18T23:54:44.946532+00:00 app[web.1]:     at require (module.js:380:17)
2015-01-18T23:54:44.946542+00:00 app[web.1]:     at Module.load (module.js:356:32)
2015-01-18T23:54:44.946536+00:00 app[web.1]:     at Object.<anonymous> (/app/server/app.js:28:28)
2015-01-18T23:54:44.946538+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2015-01-18T23:54:44.946540+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2015-01-18T23:54:44.971737+00:00 app[web.1]: npm ERR!     npm owner ls lost-paws
2015-01-18T23:54:44.971739+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-01-18T23:54:44.946544+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2015-01-18T23:54:44.961539+00:00 app[web.1]: 
2015-01-18T23:54:44.971750+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-01-18T23:54:44.971745+00:00 app[web.1]: npm ERR! cwd /app
2015-01-18T23:54:44.973687+00:00 app[web.1]: npm ERR! 
2015-01-18T23:54:44.973892+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2015-01-18T23:54:44.971741+00:00 app[web.1]: npm ERR! System Linux 3.13.0-40-generic
2015-01-18T23:54:44.974056+00:00 app[web.1]: npm ERR!     /app/npm-debug.log
2015-01-18T23:54:44.971743+00:00 app[web.1]: npm ERR! command "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-01-18T23:54:44.971747+00:00 app[web.1]: npm ERR! node -v v0.10.35
2015-01-18T23:54:44.971749+00:00 app[web.1]: npm ERR! npm -v 1.4.28
2015-01-18T23:54:44.971732+00:00 app[web.1]: npm ERR!     node server/app.js
2015-01-18T23:54:44.974317+00:00 app[web.1]: npm ERR! not ok code 0
2015-01-18T23:54:44.971735+00:00 app[web.1]: npm ERR! You can get their info via:
2015-01-18T23:54:44.968692+00:00 app[web.1]: npm ERR! lost-paws@0.0.0 start: `node server/app.js`
2015-01-18T23:54:44.968950+00:00 app[web.1]: npm ERR! Exit status 8
2015-01-18T23:54:44.969100+00:00 app[web.1]: npm ERR! 
2015-01-18T23:54:44.969217+00:00 app[web.1]: npm ERR! Failed at the lost-paws@0.0.0 start script.
2015-01-18T23:54:44.969680+00:00 app[web.1]: npm ERR! This is most likely a problem with the lost-paws package,
2015-01-18T23:54:44.969927+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-01-18T23:54:44.969818+00:00 app[web.1]: npm ERR! not with npm itself.
2015-01-18T23:54:45.880203+00:00 heroku[web.1]: Process exited with status 1
2015-01-18T23:54:45.897075+00:00 heroku[web.1]: State changed from starting to crashed
2015-01-18T23:55:16.559776+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=glacial-anchorage-9676.herokuapp.com request_id=286bd58c-aec2-459f-aa24-c1eecd29b632 fwd="199.21.87.214" dyno= connect= service= status=503 bytes=
2015-01-18T23:55:18.626486+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=glacial-anchorage-9676.herokuapp.com request_id=497bdc42-1456-4bf3-aa51-64096fc5eb20 fwd="199.21.87.214" dyno= connect= service= status=503 bytes=

I checked the following error line out:

Error: Cannot find module 'connect-livereload'

And so I tried npm installing connect-livereload to no avail.

Thought I'd share my app.js file as well:

'use strict';

// Set default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';

var express = require('express');
var mongoose = require('mongoose');
var config = require('./config/environment');

// Connect to database
mongoose.connect(config.mongo.uri, config.mongo.options);

// Populate DB with sample data
if(config.seedDB) { require('./config/seed'); }

// Setup server
var app = express();
var server = require('http').createServer(app);
var socketio = require('socket.io')(server, {
  serveClient: (config.env === 'production') ? false : true,
  path: '/socket.io-client'
});
require('./config/socketio')(socketio);
require('./config/express')(app);
require('./routes')(app);

// Start server
server.listen(config.port, config.ip, function () {
  console.log('Express server listening on %d, in %s mode', config.port, app.get('env'));
});

// Expose app
exports = module.exports = app;

Not sure where else to turn. If someone could just point me in the right direction it would be appreciated...

Seeeyonnn
  • 315
  • 2
  • 10
  • 19

1 Answers1

0

I used the following yeoman generator to build the app:

https://github.com/DaftMonk/generator-angular-fullstack

So I tried using the heroku deployment instructions on that link, which led to a couple of build errors, but eventually was able to fix those errors by following the instructions. Deployment now works so this is no longer an issue.

Seeeyonnn
  • 315
  • 2
  • 10
  • 19