My application worked locally, but when I deployed to Heroku, a problem arose. That was my fault. It seems that the error was caused by what I could not do after adding EJS.
2014-01-06T16:53:39.285571+00:00 app[web.1]: module.js:340
2014-01-06T16:53:39.285956+00:00 app[web.1]: throw err;
2014-01-06T16:53:39.286233+00:00 app[web.1]: ^
2014-01-06T16:53:39.288439+00:00 app[web.1]: Error: Cannot find module 'ejs'
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:338:15)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Function.Module._load (module.js:280:25)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at require (module.js:380:17)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:28:20)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Module._compile (module.js:456:26)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Module.require (module.js:364:17)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Module.load (module.js:356:32)
2014-01-06T16:53:39.288439+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2014-01-06T16:53:39.288617+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-01-06T16:53:40.650512+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-06T16:53:40.637888+00:00 heroku[web.1]: Process exited with status 8
2014-01-06T16:53:40.651134+00:00 heroku[web.1]: State changed from crashed to starting
2014-01-06T16:53:42.536106+00:00 heroku[web.1]: Starting process with command `node app.js`
2014-01-06T16:53:43.447621+00:00 app[web.1]:
2014-01-06T16:53:43.449816+00:00 app[web.1]: Error: Cannot find module 'ejs'
2014-01-06T16:53:43.447621+00:00 app[web.1]: module.js:340
2014-01-06T16:53:43.447926+00:00 app[web.1]: throw err;
2014-01-06T16:53:43.447926+00:00 app[web.1]: ^
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:338:15)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Function.Module._load (module.js:280:25)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Module.require (module.js:364:17)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Module._compile (module.js:456:26)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Module.load (module.js:356:32)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2014-01-06T16:53:43.449990+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at require (module.js:380:17)
2014-01-06T16:53:43.449816+00:00 app[web.1]: at Object.<anonymous> (/app/app.js:28:20)
2014-01-06T16:53:44.712427+00:00 heroku[web.1]: State changed from starting to crashed
2014-01-06T16:53:44.700963+00:00 heroku[web.1]: Process exited with status 8
2014-01-06T16:54:13.976150+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bruxzir-express.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2014-01-06T16:54:29.109297+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=bruxzir-express.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
2014-01-06T16:54:29.243506+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bruxzir-express.herokuapp.com fwd="98.173.1.66" dyno= connect= service= status=503 bytes=
After reading this question on SO, I needed to add this dependency to package.json. And to the ejs version, I started npm listand got this, which looks like there might be more errors for addressing.
application-name@0.0.1 /Users/juan.gallardo/Desktop/myfiles/test-projects/bruxzir-express-test
βββ ejs@0.8.5 extraneous
βββ¬ express@3.4.4
β βββ buffer-crc32@0.2.1
β βββ¬ commander@1.3.2
β β βββ keypress@0.1.0
β βββ¬ connect@2.11.0
β β βββ bytes@0.2.1
β β βββ methods@0.0.1
β β βββ¬ multiparty@2.2.0
β β β βββ¬ readable-stream@1.1.9
β β β β βββ core-util-is@1.0.0
β β β β βββ debuglog@0.0.2
β β β βββ stream-counter@0.2.0
β β βββ negotiator@0.3.0
β β βββ pause@0.0.1
β β βββ qs@0.6.5
β β βββ raw-body@0.0.3
β β βββ uid2@0.0.3
β βββ cookie@0.1.0
β βββ cookie-signature@1.0.1
β βββ debug@0.7.4
β βββ fresh@0.2.0
β βββ methods@0.1.0
β βββ mkdirp@0.3.5
β βββ range-parser@0.0.4
β βββ¬ send@0.1.4
β βββ mime@1.2.11
βββ¬ jade@1.0.0
β βββ character-parser@1.2.0
β βββ commander@2.0.0
β βββ¬ constantinople@1.0.2
β β βββ¬ uglify-js@2.4.8
β β βββ async@0.2.9
β β βββ¬ optimist@0.3.7
β β β βββ wordwrap@0.0.2
β β βββ¬ source-map@0.1.31
β β β βββ amdefine@0.1.0
β β βββ uglify-to-browserify@1.0.1
β βββ mkdirp@0.3.5
β βββ¬ monocle@1.1.50
β β βββ¬ readdirp@0.2.5
β β βββ¬ minimatch@0.2.14
β β βββ lru-cache@2.5.0
β β βββ sigmund@1.0.0
β βββ¬ transformers@2.1.0
β β βββ¬ css@1.0.8
β β β βββ css-parse@1.0.4
β β β βββ css-stringify@1.0.5
β β βββ¬ promise@2.0.0
β β β βββ is-promise@1.0.0
β β βββ¬ uglify-js@2.2.5
β β βββ¬ optimist@0.3.7
β β β βββ wordwrap@0.0.2
β β βββ¬ source-map@0.1.31
β β βββ amdefine@0.1.0
β βββ¬ with@2.0.0
β βββ¬ uglify-js@2.4.0
β βββ async@0.2.9
β βββ¬ optimist@0.3.7
β β βββ wordwrap@0.0.2
β βββ¬ source-map@0.1.31
β β βββ amdefine@0.1.0
β βββ uglify-to-browserify@1.0.1
βββ simple-recaptcha@0.0.3 extraneous
βββ¬ stylus@0.41.3
βββ cssom@0.2.5
βββ debug@0.7.4
βββ mkdirp@0.3.5
βββ sax@0.5.8
npm ERR! extraneous: ejs@0.8.5 /Users/juan.gallardo/Desktop/myfiles/test-projects/bruxzir-express-test/node_modules/ejs
npm ERR! extraneous: simple-recaptcha@0.0.3 /Users/juan.gallardo/Desktop/myfiles/test-projects/bruxzir-express-test/node_modules/simple-recaptcha
npm ERR! not ok code 0
source
share