Question

I created a basic app via yo angular fullstack generator (default options, yes to everything except mogodb / mongoose integration). I try to deploy using (https://github.com/DaftMonk/generator-angular-fullstack#deploy):

yo angular-fullstack:deploy heroku

A quick local test via grunt serve does not show any errors. However the app fails to run on heroku.

2014-03-05T22:02:14.180097+00:00 heroku[web.1]: Starting process with command `node   server.js`
2014-03-05T22:02:15.278412+00:00 app[web.1]:     throw err;
2014-03-05T22:02:15.278417+00:00 app[web.1]:           ^
2014-03-05T22:02:15.282842+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2014-03-05T22:02:15.282843+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2014-03-05T22:02:15.282845+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-03-05T22:02:15.277338+00:00 app[web.1]: 
2014-03-05T22:02:15.282837+00:00 app[web.1]: Error: Cannot find module 'connect-livereload'
2014-03-05T22:02:15.282846+00:00 app[web.1]:     at require (module.js:380:17)
2014-03-05T22:02:15.282850+00:00 app[web.1]:     at Function.app.configure (/app/node_modules/express/lib/application.js:391:61)
2014-03-05T22:02:15.282853+00:00 app[web.1]:     at Object.<anonymous> (/app/server.js:18:32)
2014-03-05T22:02:15.282854+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-03-05T22:02:15.282851+00:00 app[web.1]:     at module.exports (/app/lib/config/express.js:11:7)
2014-03-05T22:02:15.282848+00:00 app[web.1]:     at Function.<anonymous> (/app/lib/config/express.js:12:13)
2014-03-05T22:02:15.282856+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-03-05T22:02:15.277946+00:00 app[web.1]: module.js:340
2014-03-05T22:02:16.497764+00:00 heroku[web.1]: State changed from starting to crashed
2014-03-05T22:02:16.481923+00:00 heroku[web.1]: Process exited with status 8
2014-03-05T22:02:16.498934+00:00 heroku[web.1]: State changed from crashed to starting
2014-03-05T22:02:28.065730+00:00 heroku[web.1]: Starting process with command `node server.js`
2014-03-05T22:02:29.072801+00:00 app[web.1]: module.js:340
2014-03-05T22:02:29.072470+00:00 app[web.1]: 
2014-03-05T22:02:29.073054+00:00 app[web.1]:     throw err;
2014-03-05T22:02:29.073067+00:00 app[web.1]:           ^
2014-03-05T22:02:29.075007+00:00 app[web.1]:     at Function.Module._load (module.js:280:25)
2014-03-05T22:02:29.075002+00:00 app[web.1]: Error: Cannot find module 'connect-livereload'
2014-03-05T22:02:29.075005+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:338:15)
2014-03-05T22:02:29.075015+00:00 app[web.1]:     at module.exports (/app/lib/config/express.js:11:7)
2014-03-05T22:02:29.075009+00:00 app[web.1]:     at Module.require (module.js:364:17)
2014-03-05T22:02:29.075012+00:00 app[web.1]:     at Function.<anonymous> (/app/lib/config/express.js:12:13)
2014-03-05T22:02:29.075010+00:00 app[web.1]:     at require (module.js:380:17)
2014-03-05T22:02:29.075013+00:00 app[web.1]:     at Function.app.configure (/app/node_modules/express/lib/application.js:391:61)
2014-03-05T22:02:29.075018+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2014-03-05T22:02:29.075016+00:00 app[web.1]:     at Object.<anonymous> (/app/server.js:18:32)
2014-03-05T22:02:29.075019+00:00 app[web.1]:     at Object.Module._extensions..js (module.js:474:10)
2014-03-05T22:02:30.278488+00:00 heroku[web.1]: State changed from starting to crashed
2014-03-05T22:02:30.266595+00:00 heroku[web.1]: Process exited with status 8

Apparently this module: Error: Cannot find module 'connect-livereload' cannot be loaded. I found this Heroku Deploy Error: Cannot find module './errors/cast' on stackoverflow but I did not manage to solve the problem.

Hopefully someone could help me out.

Was it helpful?

Solution

as pointed out here: How can I get rid of Error: Cannot find module 'models' on Heroku

the environment variables for heroku have to be set

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top