我通过 yo angular fullstack 生成器创建了一个基本应用程序(默认选项,除了 mogodb / mongoose 集成之外的所有内容都是肯定的)。我尝试使用(https://github.com/DaftMonk/generator-angular-fullstack#deploy)进行部署:
yo angular-fullstack:deploy heroku
通过 grunt serve 进行的快速本地测试不会显示任何错误。但是,该应用程序无法在 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
显然这个模块:错误:找不到模块'connect-livereload'无法加载。我发现这个Heroku Deploy Error: Cannot find module './errors/cast' on stackoverflow 但我没能解决这个问题。
希望有人可以帮助我。