1 Nov 2015 17:48:36.114 2015-11-01 16:48:35.661403+00:00 app web.1 - - Error: Cannot find module 'ms'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/app/app.js:13:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16) at node.js:814:3 Exception Contex
I got the same error locally, I had to remove the node_modules directory for it to work.
I think it's a cache issue.
{
"name": "mondedie-chat",
"version": "1.0.0",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"bluebird": "^3.0.5",
"body-parser": "~1.14.1",
"compression": "^1.5.2",
"connect-redis": "^3.0.1",
"cookie-parser": "~1.4.0",
"debug": "~2.2.0",
"dotenv": "^1.2.0",
"emojione": "^1.5.0",
"express": "~4.13.1",
"express-debug": "^1.1.1",
"express-session": "^1.11.3",
"express-validator": "^2.17.1",
"highlight.js": "^8.8.0",
"jade": "~1.11.0",
"marked": "^0.3.5",
"moment": "^2.10.6",
"moment-timezone": "^0.4.0",
"morgan": "~1.6.1",
"ms": "^0.7.1",
"redis": "^2.3.0",
"request": "^2.61.0",
"serve-favicon": "~2.3.0",
"serve-static": "^1.10.0",
"socket.io": "^1.3.6",
"socket.io-express-session": "^0.1.2"
},
"devDependencies": {
"del": "^2.0.2",
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-bower": "0.0.10",
"gulp-concat": "^2.6.0",
"gulp-csscomb": "^3.0.6",
"gulp-filter": "^3.0.1",
"gulp-inject": "^3.0.0",
"gulp-jshint": "^1.11.2",
"gulp-minify-css": "^1.2.1",
"gulp-rev": "^6.0.1",
"gulp-sass": "^2.0.4",
"gulp-size": "^2.0.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.4.1",
"jshint-stylish": "^2.0.1",
"run-sequence": "^1.1.4"
},
"engines": {
"node": "0.12.x"
}
}
-----> Fetching custom buildpack https://github.com/robgraeber/heroku-buildpack-nodejs-bower-gulp... done
-----> Node.js/Bower/Gulp app detected
-----> Requested node range: 0.12.x
-----> Resolved node version: 0.12.7
-----> Downloading and installing node
-----> Downloading and installing npm
-----> Installing nasm from source
-----> Restoring node_modules directory from cache
-----> Pruning cached dependencies not specified in package.json
-----> Copying bower from cache
-----> Copying gulp from cache
-----> Found bower.json - Updating bower locally
-----> Restoring client/bower directory from cache
-----> Pruning cached dependencies not specified in bower.json
-----> Exporting config vars to environment
-----> Installing npm dependencies
- [email protected] node_modules/body-parser/node_modules/depd
- [email protected] node_modules/body-parser/node_modules/http-errors/node_modules/inherits
- [email protected] node_modules/body-parser/node_modules/iconv-lite
[email protected] node_modules/ms -> node_modules/body-parser/node_modules/ms
[email protected] node_modules/debug -> node_modules/body-parser/node_modules/debug
- [email protected] node_modules/body-parser/node_modules/qs
[email protected] node_modules/body-parser/node_modules/bytes -> node_modules/bytes
- [email protected] node_modules/connect-redis/node_modules/debug/node_modules/ms
- [email protected] node_modules/connect-redis/node_modules/redis
[email protected] node_modules/body-parser/node_modules/content-type -> node_modules/content-type
- [email protected] node_modules/cookie-parser/node_modules/cookie
[email protected] node_modules/cookie-parser/node_modules/cookie-signature -> node_modules/cookie-signature
[email protected] node_modules/body-parser/node_modules/on-finished/node_modules/ee-first -> node_modules/ee-first
[email protected] node_modules/body-parser/node_modules/raw-body/node_modules/iconv-lite -> node_modules/iconv-lite
[email protected] node_modules/body-parser/node_modules/type-is/node_modules/media-typer -> node_modules/media-typer
[email protected] node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db -> node_modules/mime-db
[email protected] node_modules/body-parser/node_modules/type-is/node_modules/mime-types -> node_modules/mime-types
[email protected] node_modules/body-parser/node_modules/on-finished -> node_modules/on-finished
[email protected] node_modules/body-parser/node_modules/http-errors/node_modules/statuses -> node_modules/statuses
[email protected] node_modules/body-parser/node_modules/http-errors -> node_modules/http-errors
[email protected] node_modules/body-parser/node_modules/type-is -> node_modules/type-is
[email protected] node_modules/body-parser/node_modules/raw-body/node_modules/unpipe -> node_modules/unpipe
[email protected] node_modules/body-parser/node_modules/raw-body -> node_modules/raw-body
[email protected] /tmp/build_150460b5027d9d99b100ef50619616e2
├── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
└─┬ [email protected]
├── [email protected]
└── [email protected]
-----> Installing bower dependencies
-----> Building runtime environment
-----> Exporting config vars to environment
-----> Updating gulp locally
-----> Found gulpfile, running gulp default task
[16:48:06] Using gulpfile /tmp/build_150460b5027d9d99b100ef50619616e2/gulpfile.js
[16:48:06] Starting 'bower'...
[16:48:06] Using cwd: /tmp/build_150460b5027d9d99b100ef50619616e2
[16:48:06] Using bower dir: client/bower
[16:48:06] Starting 'lint'...
[16:48:07] Finished 'lint' after 1.04 s
[16:48:08] Finished 'bower' after 1.41 s
[16:48:08] Starting 'clean-css'...
[16:48:08] Starting 'clean-js'...
[16:48:08] Starting 'fonts'...
[16:48:08] Starting 'emojione-strategy'...
[16:48:08] Finished 'clean-css' after 10 ms
[16:48:08] Starting 'sass'...
[16:48:08] Finished 'clean-js' after 25 ms
[16:48:08] Starting 'js'...
[16:48:08] Finished 'emojione-strategy' after 139 ms
[16:48:10] fichier app.min.css all files 122.58 kB
[16:48:10] Finished 'sass' after 2.24 s
[16:48:10] Starting 'inject-css'...
[16:48:10] gulp-inject 1 files into css.jade.
[16:48:10] Finished 'inject-css' after 20 ms
[16:48:10] Finished 'fonts' after 2.35 s
[16:48:10] fichier app.min.js all files 403.93 kB
[16:48:10] Finished 'js' after 2.52 s
[16:48:10] Starting 'inject-js'...
[16:48:10] gulp-inject 1 files into javascript.jade.
[16:48:10] Finished 'inject-js' after 5.7 ms
[16:48:10] Starting 'default'...
[16:48:10] Finished 'default' after 25 μs
-----> Caching node_modules directory for future builds
-----> Caching client/bower directory for future builds
-----> Caching vendor directory for future builds
-----> Discovering process types
Procfile declares types -> web
-----> Compressing... done, 41.0MB
-----> Launching... done, v195
https://mondedie-chat.herokuapp.com/ deployed to Heroku