My app was working locally but when I deployed to Heroku, there was an issue. This was my error, It seems that the error was caused by something that I failed to do after I added 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 that dependency in the package.json . And to the version of ejs I ran npm list and got this, which looks like there might be more errors to address.
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
I resolved this just by listing EJS and its version into my package.json .
"ejs": "0.8.5"
If you do not know the version of EJS that you have, the way I found mine was to run npm list.
Here is my current entire file if you are curious how it all fits in together to deploy on heroku.
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "3.4.4",
"jade": "*",
"stylus": "*",
"ejs": "0.8.5"
},
"engines": {
"node": "0.10.1",
"npm": "1.3.14"
}
}
Related
I am running a node js app on nginx/digital ocean .
When i try to run pm2 start app.js i get this
┌─────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ app │ default │ 1.2.0 │ fork │ 0 │ 0 │ 30 │ errored │ 0% │ 0b │ root │ disabled │
│ 1 │ app │ default │ 1.2.0 │ fork │ 49014 │ 0s │ 0 │ online │ 0% │ 15.1mb │ root │ disabled │
└─────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
**
when i try "node app.js" looks like this**
node:events:491
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE: address already in use :::4000
at Server.setupListenHandle [as _listen2] (node:net:1733:16)
at listenInCluster (node:net:1781:12)
at Server.listen (node:net:1869:7)
at Function.listen (/var/www/delivery.emms.io/html/node_modules/express/lib/application.js:618:24)
at Object.<anonymous> (/var/www/delivery.emms.io/html/app.js:114:5)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
at Module.load (node:internal/modules/cjs/loader:1081:32)
at Module._load (node:internal/modules/cjs/loader:922:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (node:net:1760:8)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'EADDRINUSE',
errno: -98,
syscall: 'listen',
address: '::',
port: 4000
}
i tried getting the PID and using kill -9 but no success
any ideas?
In the documentation for highcharts-export-server : it says that you should use PM2 to run it as a server but I just can't get this to work on my Windows machine.
I have no problem to run it from the command line :
highcharts-export-server --enableServer 1
However when I run :
pm2 start highcharts-export-server -- --enableServer 1
I get :
[PM2] Applying action restartProcessId on app [highcharts-export-server](ids: [ 0 ])
[PM2] [highcharts-export-server](0) ✓
[PM2] Process successfully started
┌─────┬─────────────────────────────┬─────────────┬─────────┬─────────┬──────────┬─────── ─┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼─────────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ highcharts-export-server │ default │ N/A │ fork │ 13916 │ 0 │ 50 │ stopped │ 0% │ 0b │ <ME> │ disabled │
└─────┴─────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
It doesn't work and I get this error multiple times in highcharts-export-server-error.log :
C:\USERS\<ME>\APPDATA\ROAMING\NPM\HIGHCHARTS-EXPORT-SERVER.CMD:1
#ECHO off
^
SyntaxError: Invalid or unexpected token
at Object.compileFunction (node:vm:352:18)
at wrapSafe (node:internal/modules/cjs/loader:1033:15)
at Module._compile (node:internal/modules/cjs/loader:1069:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Object.<anonymous> (C:\Users\lars\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
I don't undertand what I'm doing wrong here because this works flawlessly on my Mac machine
I am getting this error, verdaccio just crashed and no longer working after a server restart. When I try to pm2 start verdaccio , I get the following error
Error: Cannot find module '/home/ec2-user/verdaccio'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:53:21)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
npm config ls
; cli configs
scope = ""
user-agent = "npm/4.2.0 node/v7.10.0 linux x64"
; userconfig /home/ec2-user/.npmrc
http-proxy = null
https-proxy = null
registry = "https://registry.npmjs.org/"
strict-ssl = false
; globalconfig /usr/etc/npmrc
registry = "https://registry.npmjs.org/"
; node bin location = /usr/bin/node
; cwd = /home/ec2-user/verdaccio
; HOME = /home/ec2-user
; "npm config ls -l" to show all defaults.
pm2 show verdaccio
│ name │ verdaccio │
│ restarts │ 255 │
│ uptime │ 0 │
│ script path │ /home/ec2-user/verdaccio │
│ script args │ N/A │
│ error log path │ /home/ec2-user/.pm2/logs/verdaccio-error-0.log │
│ out log path │ /home/ec2-user/.pm2/logs/verdaccio-out-0.log │
│ pid path │ /home/ec2-user/.pm2/pids/verdaccio-0.pid │
│ interpreter │ node │
│ interpreter args │ N/A │
│ script id │ 0 │
│ exec cwd │ /home/ec2-user │
│ exec mode │ fork_mode │
│ node.js version │ 7.10.0 │
│ watch & reload │ ✘ │
│ unstable restarts │ 0 │
│ created at │ N/A
`
My config file is as follows:
storage: ./storage
auth:
htpasswd:
file: ./htpasswd
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'av-*':
allow_access: $all
allow_publish: $all
'*':
allow_access: $all
allow_publish: $all
proxy: npmjs
'#*/*':
allow_access: $all
allow_publish: $authenticated
proxy: npmjs
https:
key: /home/ec2-user/verdaccio/verdaccio-keynew.pem
cert: /home/ec2-user/verdaccio/verdaccio-certnew.pem
ca: /home/ec2-user/verdaccio/server.ca
logs:
- {type: stdout, format: pretty, level: http}
#- {type: file, path: verdaccio.log, level: info}
listen:
- https://devnpm2:4873
max_body_size: 300mb
It can't find the verdaccio executable, to locate it you can use the which command.
To do this you should try:
pm2 start `which verdaccio`
I've been attempting to install the twilio sms marketing example app (https://github.com/TwilioDevEd/marketing-notifications-node/tree/master) . I've installed mongodb and mongo and have been able to run them without any problems. The problems occur when I try to run the node . command. I receive throw errors. Here is the error I receive when I try to use node . in the project directory.
MacBook-Pro:marketing-notifications-node-master user$ node .
module.js:471
throw err;
^
Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/$USER/Desktop/marketing-notifications-node-master/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:8:52)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
MacBook-Pro:marketing-notifications-node-master $USER$
I really need help to figure this out.
I've tried
npm cache clean
npm install -g npm#latest
npm install
npm install
output:
/Users/$USER/.npm-packages/bin/npm -> /Users/$USER/.npm-packages/lib/node_modules/npm/bin/npm-cli.js
/Users/$USER/.npm-packages/lib
└─┬ npm#4.3.0
├── abbrev#1.0.9
├── ansi-regex#2.1.1
├── ansicolors#0.3.2
├── ansistyles#0.1.3
├── aproba#1.1.1
├── archy#1.0.0
├── asap#2.0.5
├── chownr#1.0.1
├── cmd-shim#2.0.2
├─┬ columnify#1.5.4
│ └─┬ wcwidth#1.0.0
│ └─┬ defaults#1.0.3
│ └── clone#1.0.2
├─┬ config-chain#1.1.11
│ └── proto-list#1.2.4
├── debuglog#1.0.1
├── dezalgo#1.0.3
├── editor#1.0.0
├── fs-vacuum#1.2.9
├── fs-write-stream-atomic#1.0.8
├── fstream#1.0.10
├─┬ fstream-npm#1.2.0
│ └─┬ fstream-ignore#1.0.5
│ └─┬ minimatch#3.0.3
│ └─┬ brace-expansion#1.1.6
│ ├── balanced-match#0.4.2
│ └── concat-map#0.0.1
├─┬ glob#7.1.1
│ ├── fs.realpath#1.0.0
│ ├─┬ minimatch#3.0.3
│ │ └─┬ brace-expansion#1.1.6
│ │ ├── balanced-match#0.4.2
│ │ └── concat-map#0.0.1
│ └── path-is-absolute#1.0.1
├── graceful-fs#4.1.11
├── has-unicode#2.0.1
├── hosted-git-info#2.2.0
├── iferr#0.1.5
├── imurmurhash#0.1.4
├── inflight#1.0.6
├── inherits#2.0.3
├── ini#1.3.4
├─┬ init-package-json#1.9.4
│ ├─┬ glob#6.0.4
│ │ ├─┬ minimatch#3.0.3
│ │ │ └─┬ brace-expansion#1.1.6
│ │ │ ├── balanced-match#0.4.2
│ │ │ └── concat-map#0.0.1
│ │ └── path-is-absolute#1.0.0
│ └── promzard#0.3.0
├─┬ JSONStream#1.3.0
│ ├── jsonparse#1.2.0
│ └── through#2.3.8
├── lazy-property#1.0.0
├── lockfile#1.0.3
├── lodash._baseindexof#3.1.0
├─┬ lodash._baseuniq#4.6.0
│ ├── lodash._createset#4.0.3
│ └── lodash._root#3.0.1
├── lodash._bindcallback#3.0.1
├── lodash._cacheindexof#3.0.2
├── lodash._createcache#3.1.2
├── lodash._getnative#3.9.1
├── lodash.clonedeep#4.5.0
├── lodash.restparam#3.6.1
├── lodash.union#4.6.0
├── lodash.uniq#4.5.0
├── lodash.without#4.4.0
├─┬ mississippi#1.3.0
│ ├─┬ concat-stream#1.6.0
│ │ └── typedarray#0.0.6
│ ├─┬ duplexify#3.5.0
│ │ ├─┬ end-of-stream#1.0.0
│ │ │ └── once#1.3.3
│ │ └── stream-shift#1.0.0
│ ├─┬ end-of-stream#1.1.0
│ │ └── once#1.3.3
│ ├── flush-write-stream#1.0.2
│ ├── from2#2.3.0
│ ├─┬ parallel-transform#1.1.0
│ │ └── cyclist#0.2.2
│ ├── pump#1.0.2
│ ├── pumpify#1.3.5
│ ├─┬ stream-each#1.2.0
│ │ └── stream-shift#1.0.0
│ └─┬ through2#2.0.3
│ └── xtend#4.0.1
├─┬ mkdirp#0.5.1
│ └── minimist#0.0.8
├─┬ node-gyp#3.5.0
│ ├─┬ minimatch#3.0.3
│ │ └─┬ brace-expansion#1.1.6
│ │ ├── balanced-match#0.4.2
│ │ └── concat-map#0.0.1
│ └── nopt#3.0.6
├─┬ nopt#4.0.1
│ └─┬ osenv#0.1.4
│ ├── os-homedir#1.0.2
│ └── os-tmpdir#1.0.2
├── normalize-git-url#3.0.2
├─┬ normalize-package-data#2.3.5
│ └─┬ is-builtin-module#1.0.0
│ └── builtin-modules#1.1.1
├── npm-cache-filename#1.0.2
├── npm-install-checks#3.0.0
├── npm-package-arg#4.2.0
├─┬ npm-registry-client#7.4.5
│ └─┬ concat-stream#1.5.2
│ ├─┬ readable-stream#2.0.6
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ └── typedarray#0.0.6
├── npm-user-validate#0.1.5
├─┬ npmlog#4.0.2
│ ├─┬ are-we-there-yet#1.1.2
│ │ └── delegates#1.0.0
│ ├── console-control-strings#1.1.0
│ ├─┬ gauge#2.7.2
│ │ ├── object-assign#4.1.0
│ │ ├── signal-exit#3.0.2
│ │ ├─┬ string-width#1.0.2
│ │ │ ├── code-point-at#1.1.0
│ │ │ └─┬ is-fullwidth-code-point#1.0.0
│ │ │ └── number-is-nan#1.0.1
│ │ ├── supports-color#0.2.0
│ │ └── wide-align#1.1.0
│ └── set-blocking#2.0.0
├── once#1.4.0
├── opener#1.4.2
├─┬ osenv#0.1.4
│ ├── os-homedir#1.0.2
│ └── os-tmpdir#1.0.2
├── path-is-inside#1.0.2
├─┬ read#1.0.7
│ └── mute-stream#0.0.5
├── read-cmd-shim#1.0.1
├─┬ read-installed#4.0.3
│ └── util-extend#1.0.3
├─┬ read-package-json#2.0.4
│ ├─┬ glob#6.0.4
│ │ ├─┬ minimatch#3.0.3
│ │ │ └─┬ brace-expansion#1.1.6
│ │ │ ├── balanced-match#0.4.2
│ │ │ └── concat-map#0.0.1
│ │ └── path-is-absolute#1.0.0
│ └─┬ json-parse-helpfulerror#1.0.3
│ └── jju#1.3.0
├── read-package-tree#5.1.5
├─┬ readable-stream#2.2.2
│ ├── buffer-shims#1.0.0
│ ├── core-util-is#1.0.2
│ ├── isarray#1.0.0
│ ├── process-nextick-args#1.0.7
│ ├── string_decoder#0.10.31
│ └── util-deprecate#1.0.2
├── readdir-scoped-modules#1.0.2
├── realize-package-specifier#3.0.3
├─┬ request#2.79.0
│ ├── aws-sign2#0.6.0
│ ├── aws4#1.5.0
│ ├── caseless#0.11.0
│ ├─┬ combined-stream#1.0.5
│ │ └── delayed-stream#1.0.0
│ ├── extend#3.0.0
│ ├── forever-agent#0.6.1
│ ├─┬ form-data#2.1.2
│ │ └── asynckit#0.4.0
│ ├─┬ har-validator#2.0.6
│ │ ├─┬ chalk#1.1.3
│ │ │ ├── ansi-styles#2.2.1
│ │ │ ├── escape-string-regexp#1.0.5
│ │ │ ├── has-ansi#2.0.0
│ │ │ └── supports-color#2.0.0
│ │ ├─┬ commander#2.9.0
│ │ │ └── graceful-readlink#1.0.1
│ │ ├─┬ is-my-json-valid#2.15.0
│ │ │ ├── generate-function#2.0.0
│ │ │ ├─┬ generate-object-property#1.2.0
│ │ │ │ └── is-property#1.0.2
│ │ │ ├── jsonpointer#4.0.0
│ │ │ └── xtend#4.0.1
│ │ └─┬ pinkie-promise#2.0.1
│ │ └── pinkie#2.0.4
│ ├─┬ hawk#3.1.3
│ │ ├── boom#2.10.1
│ │ ├── cryptiles#2.0.5
│ │ ├── hoek#2.16.3
│ │ └── sntp#1.0.9
│ ├─┬ http-signature#1.1.1
│ │ ├── assert-plus#0.2.0
│ │ ├─┬ jsprim#1.3.1
│ │ │ ├── extsprintf#1.0.2
│ │ │ ├── json-schema#0.2.3
│ │ │ └── verror#1.3.6
│ │ └─┬ sshpk#1.10.1
│ │ ├── asn1#0.2.3
│ │ ├── assert-plus#1.0.0
│ │ ├── bcrypt-pbkdf#1.0.0
│ │ ├── dashdash#1.14.1
│ │ ├── ecc-jsbn#0.1.1
│ │ ├── getpass#0.1.6
│ │ ├── jodid25519#1.0.2
│ │ ├── jsbn#0.1.0
│ │ └── tweetnacl#0.14.3
│ ├── is-typedarray#1.0.0
│ ├── isstream#0.1.2
│ ├── json-stringify-safe#5.0.1
│ ├─┬ mime-types#2.1.13
│ │ └── mime-db#1.25.0
│ ├── oauth-sign#0.8.2
│ ├── qs#6.3.0
│ ├── stringstream#0.0.5
│ ├─┬ tough-cookie#2.3.2
│ │ └── punycode#1.4.1
│ └── tunnel-agent#0.4.3
├── retry#0.10.1
├── rimraf#2.5.4
├── semver#5.3.0
├── sha#2.0.1
├── slide#1.1.6
├── sorted-object#2.0.1
├─┬ sorted-union-stream#2.1.3
│ ├─┬ from2#1.3.0
│ │ └─┬ readable-stream#1.1.14
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#0.0.1
│ │ └── string_decoder#0.10.31
│ └── stream-iterate#1.1.1
├── strip-ansi#3.0.1
├─┬ tar#2.2.1
│ └── block-stream#0.0.8
├── text-table#0.2.0
├── uid-number#0.0.6
├── umask#1.1.0
├─┬ unique-filename#1.1.0
│ └── unique-slug#2.0.0
├── unpipe#1.0.0
├── uuid#3.0.1
├─┬ validate-npm-package-license#3.0.1
│ ├─┬ spdx-correct#1.0.2
│ │ └── spdx-license-ids#1.2.0
│ └─┬ spdx-expression-parse#1.0.2
│ ├── spdx-exceptions#1.0.4
│ └── spdx-license-ids#1.2.0
├─┬ validate-npm-package-name#2.2.2
│ └── builtins#0.0.7
├─┬ which#1.2.12
│ └── isexe#1.1.2
├── wrappy#1.0.2
└── write-file-atomic#1.3.1
I then attempted to run node . and received the following error
MacBook-Pro:marketing-notifications-node-master $USER$ node .
module.js:471
throw err;
^
Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/$USER/Desktop/marketing-notifications-node-master/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:8:52)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
EDIT
I tried deleting and reclining the original project file. I did npm install and received this output:
npm install
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated node-uuid#1.4.7: use uuid module instead
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated mongodb#1.4.12: Please upgrade to 2.2.19 or higher
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> kerberos#0.0.4 install /Users/$USER/Desktop/marketing-notifications-node-master/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> bson#0.2.22 install /Users/$USER/Desktop/marketing-notifications-node-master/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
sms-notifications-node#1.0.0 /Users/$USER/Desktop/marketing-notifications-node-master
├─┬ body-parser#1.17.1
│ ├── bytes#2.4.0
│ ├── content-type#1.0.2
│ ├─┬ debug#2.6.1
│ │ └── ms#0.7.2
│ ├── depd#1.1.0
│ ├─┬ http-errors#1.6.1
│ │ └── inherits#2.0.3
│ ├── iconv-lite#0.4.15
│ ├─┬ on-finished#2.3.0
│ │ └── ee-first#1.1.1
│ ├── qs#6.4.0
│ ├─┬ raw-body#2.2.0
│ │ └── unpipe#1.0.0
│ └─┬ type-is#1.6.14
│ ├── media-typer#0.3.0
│ └─┬ mime-types#2.1.14
│ └── mime-db#1.26.0
├─┬ chai#2.3.0
│ ├── assertion-error#1.0.0
│ └─┬ deep-eql#0.1.3
│ └── type-detect#0.1.1
├── connect-flash#0.1.1
├─┬ express#4.15.2
│ ├─┬ accepts#1.3.3
│ │ └── negotiator#0.6.1
│ ├── array-flatten#1.1.1
│ ├── content-disposition#0.5.2
│ ├── cookie#0.3.1
│ ├── cookie-signature#1.0.6
│ ├── encodeurl#1.0.1
│ ├── escape-html#1.0.3
│ ├── etag#1.8.0
│ ├── finalhandler#1.0.0
│ ├── fresh#0.5.0
│ ├── merge-descriptors#1.0.1
│ ├── methods#1.1.2
│ ├── parseurl#1.3.1
│ ├── path-to-regexp#0.1.7
│ ├─┬ proxy-addr#1.1.3
│ │ ├── forwarded#0.1.0
│ │ └── ipaddr.js#1.2.0
│ ├── range-parser#1.2.0
│ ├─┬ send#0.15.1
│ │ ├── destroy#1.0.4
│ │ └── mime#1.3.4
│ ├── serve-static#1.12.1
│ ├── setprototypeof#1.0.3
│ ├── statuses#1.3.1
│ ├── utils-merge#1.0.0
│ └── vary#1.1.0
├─┬ express-session#1.15.1
│ ├── crc#3.4.4
│ ├── on-headers#1.0.1
│ └─┬ uid-safe#2.1.4
│ └── random-bytes#1.0.0
├─┬ http-auth#2.4.11
│ ├─┬ apache-crypt#1.1.2
│ │ └── unix-crypt-td-js#1.0.0
│ ├── apache-md5#1.0.6
│ └── node-uuid#1.4.7
├─┬ jade#1.11.0
│ ├── character-parser#1.2.1
│ ├─┬ clean-css#3.4.25
│ │ ├─┬ commander#2.8.1
│ │ │ └── graceful-readlink#1.0.1
│ │ └─┬ source-map#0.4.4
│ │ └── amdefine#1.0.1
│ ├── commander#2.6.0
│ ├─┬ constantinople#3.0.2
│ │ └── acorn#2.7.0
│ ├─┬ jstransformer#0.0.2
│ │ ├── is-promise#2.1.0
│ │ └─┬ promise#6.1.0
│ │ └── asap#1.0.0
│ ├─┬ mkdirp#0.5.1
│ │ └── minimist#0.0.8
│ ├─┬ 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.1
│ │ └─┬ uglify-js#2.2.5
│ │ ├─┬ optimist#0.3.7
│ │ │ └── wordwrap#0.0.3
│ │ └── source-map#0.1.43
│ ├─┬ uglify-js#2.8.8
│ │ ├── source-map#0.5.6
│ │ ├── uglify-to-browserify#1.0.2
│ │ └─┬ yargs#3.10.0
│ │ ├── camelcase#1.2.1
│ │ ├─┬ cliui#2.1.0
│ │ │ ├─┬ center-align#0.1.3
│ │ │ │ ├─┬ align-text#0.1.4
│ │ │ │ │ ├─┬ kind-of#3.1.0
│ │ │ │ │ │ └── is-buffer#1.1.4
│ │ │ │ │ ├── longest#1.0.1
│ │ │ │ │ └── repeat-string#1.6.1
│ │ │ │ └── lazy-cache#1.0.4
│ │ │ ├── right-align#0.1.3
│ │ │ └── wordwrap#0.0.2
│ │ ├── decamelize#1.2.0
│ │ └── window-size#0.1.0
│ ├── void-elements#2.0.1
│ └─┬ with#4.0.3
│ ├── acorn#1.2.2
│ └── acorn-globals#1.0.9
├─┬ mocha#2.5.3
│ ├── commander#2.3.0
│ ├─┬ debug#2.2.0
│ │ └── ms#0.7.1
│ ├── diff#1.4.0
│ ├── escape-string-regexp#1.0.2
│ ├─┬ glob#3.2.11
│ │ └─┬ minimatch#0.3.0
│ │ ├── lru-cache#2.7.3
│ │ └── sigmund#1.0.1
│ ├── growl#1.9.2
│ ├─┬ jade#0.26.3
│ │ ├── commander#0.6.1
│ │ └── mkdirp#0.3.0
│ ├── supports-color#1.2.0
│ └── to-iso-string#0.0.2
├─┬ mongoose#3.9.7
│ ├── async#0.9.0
│ ├── hooks#0.3.2
│ ├── kareem#0.0.4
│ ├─┬ mongodb#1.4.12
│ │ ├─┬ bson#0.2.22
│ │ │ └── nan#1.8.4
│ │ ├── kerberos#0.0.4
│ │ └─┬ readable-stream#2.2.3
│ │ ├── buffer-shims#1.0.0
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ ├── mpath#0.1.1
│ ├── mpromise#0.5.4
│ ├─┬ mquery#1.0.0
│ │ └── debug#0.7.4
│ ├── ms#0.1.0
│ ├── muri#0.3.1
│ ├── regexp-clone#0.0.1
│ └── sliced#0.0.5
├─┬ morgan#1.8.1
│ └── basic-auth#1.1.0
└─┬ twilio#1.11.1
├── jwt-simple#0.1.0
├── q#0.9.7
├─┬ request#2.27.0
│ ├── aws-sign#0.3.0
│ ├── cookie-jar#0.3.0
│ ├── forever-agent#0.5.2
│ ├─┬ form-data#0.1.4
│ │ ├─┬ combined-stream#0.0.7
│ │ │ └── delayed-stream#0.0.5
│ │ └── mime#1.2.11
│ ├─┬ hawk#1.0.0
│ │ ├── boom#0.4.2
│ │ ├── cryptiles#0.2.2
│ │ ├── hoek#0.9.1
│ │ └── sntp#0.2.4
│ ├─┬ http-signature#0.10.1
│ │ ├── asn1#0.1.11
│ │ ├── assert-plus#0.1.5
│ │ └── ctype#0.5.3
│ ├── json-stringify-safe#5.0.1
│ ├── mime#1.2.11
│ ├── oauth-sign#0.3.0
│ ├── qs#0.6.6
│ └── tunnel-agent#0.3.0
├── scmp#0.0.3
└── underscore#1.8.3
I then tried to run node . and received the error:
MacBook-Pro:marketing-notifications-node-master $USER$ node .
module.js:471
throw err;
^
Error: Cannot find module 'mongodb/node_modules/bson'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/$USER/Desktop/marketing-notifications-node-master/node_modules/mongoose/lib/drivers/node-mongodb-native/objectid.js:8:52)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
EDIT
I've attempted to use npm install -g node-gyp then npm install mongoose#3.9.7
npm install -g node-gyp gave an output of :
MacBook-Pro:marketing-notifications-node-master $USER$ npm install -g node-gyp
/Users/$USER/.npm-packages/bin/node-gyp -> /Users/$USER/.npm-packages/lib/node_modules/node-gyp/bin/node-gyp.js
/Users/$USER/.npm-packages/lib
└── node-gyp#3.5.0
MacBook-Pro:marketing-notifications-node-master $USER$ npm install mongoose#3.9.7
npm WARN deprecated mongodb#1.4.12: Please upgrade to 2.2.19 or higher
sms-notifications-node#1.0.0 /Users/$USER/Desktop/marketing-notifications-node-master
└── mongoose#3.9.7
Twilio developer evangelist here.
I'm going to try to solve this outside of the comments as that is going to be difficult.
It looks as though you are having problems installing your dependencies. From this issue on npm's GitHub project the suggestion is to run:
npm cache clean
npm install -g npm#latest
Then try to run your full npm install again and if that works, run node .. Do all of this inside your project directory. If it doesn't work, please update your question with any error messages and I will try again!
Edit my output from npm install
$ npm install
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated node-uuid#1.4.7: use uuid module instead
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated mongodb#1.4.12: Please upgrade to 2.2.19 or higher
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated to-iso-string#0.0.2: to-iso-string has been deprecated, use #segment/to-iso-string instead.
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
> kerberos#0.0.4 install /Users/pnash/projects/node-projects/marketing-notifications-node/node_modules/kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
> bson#0.2.22 install /Users/pnash/projects/node-projects/marketing-notifications-node/node_modules/bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
CXX(target) Release/obj.target/bson/ext/bson.o
sms-notifications-node#1.0.0 /Users/pnash/projects/node-projects/marketing-notifications-node
├─┬ body-parser#1.17.1
│ ├── bytes#2.4.0
│ ├── content-type#1.0.2
│ ├─┬ debug#2.6.1
│ │ └── ms#0.7.2
│ ├── depd#1.1.0
│ ├─┬ http-errors#1.6.1
│ │ └── inherits#2.0.3
│ ├── iconv-lite#0.4.15
│ ├─┬ on-finished#2.3.0
│ │ └── ee-first#1.1.1
│ ├── qs#6.4.0
│ ├─┬ raw-body#2.2.0
│ │ └── unpipe#1.0.0
│ └─┬ type-is#1.6.14
│ ├── media-typer#0.3.0
│ └─┬ mime-types#2.1.14
│ └── mime-db#1.26.0
├─┬ chai#2.3.0
│ ├── assertion-error#1.0.0
│ └─┬ deep-eql#0.1.3
│ └── type-detect#0.1.1
├── connect-flash#0.1.1
├─┬ express#4.15.2
│ ├─┬ accepts#1.3.3
│ │ └── negotiator#0.6.1
│ ├── array-flatten#1.1.1
│ ├── content-disposition#0.5.2
│ ├── cookie#0.3.1
│ ├── cookie-signature#1.0.6
│ ├── encodeurl#1.0.1
│ ├── escape-html#1.0.3
│ ├── etag#1.8.0
│ ├── finalhandler#1.0.0
│ ├── fresh#0.5.0
│ ├── merge-descriptors#1.0.1
│ ├── methods#1.1.2
│ ├── parseurl#1.3.1
│ ├── path-to-regexp#0.1.7
│ ├─┬ proxy-addr#1.1.3
│ │ ├── forwarded#0.1.0
│ │ └── ipaddr.js#1.2.0
│ ├── range-parser#1.2.0
│ ├─┬ send#0.15.1
│ │ ├── destroy#1.0.4
│ │ └── mime#1.3.4
│ ├── serve-static#1.12.1
│ ├── setprototypeof#1.0.3
│ ├── statuses#1.3.1
│ ├── utils-merge#1.0.0
│ └── vary#1.1.0
├─┬ express-session#1.15.1
│ ├── crc#3.4.4
│ ├── on-headers#1.0.1
│ └─┬ uid-safe#2.1.4
│ └── random-bytes#1.0.0
├─┬ http-auth#2.4.11
│ ├─┬ apache-crypt#1.1.2
│ │ └── unix-crypt-td-js#1.0.0
│ ├── apache-md5#1.0.6
│ └── node-uuid#1.4.7
├─┬ jade#1.11.0
│ ├── character-parser#1.2.1
│ ├─┬ clean-css#3.4.25
│ │ ├─┬ commander#2.8.1
│ │ │ └── graceful-readlink#1.0.1
│ │ └─┬ source-map#0.4.4
│ │ └── amdefine#1.0.1
│ ├── commander#2.6.0
│ ├─┬ constantinople#3.0.2
│ │ └── acorn#2.7.0
│ ├─┬ jstransformer#0.0.2
│ │ ├── is-promise#2.1.0
│ │ └─┬ promise#6.1.0
│ │ └── asap#1.0.0
│ ├─┬ mkdirp#0.5.1
│ │ └── minimist#0.0.8
│ ├─┬ 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.1
│ │ └─┬ uglify-js#2.2.5
│ │ ├─┬ optimist#0.3.7
│ │ │ └── wordwrap#0.0.3
│ │ └── source-map#0.1.43
│ ├─┬ uglify-js#2.8.8
│ │ ├── source-map#0.5.6
│ │ ├── uglify-to-browserify#1.0.2
│ │ └─┬ yargs#3.10.0
│ │ ├── camelcase#1.2.1
│ │ ├─┬ cliui#2.1.0
│ │ │ ├─┬ center-align#0.1.3
│ │ │ │ ├─┬ align-text#0.1.4
│ │ │ │ │ ├─┬ kind-of#3.1.0
│ │ │ │ │ │ └── is-buffer#1.1.4
│ │ │ │ │ ├── longest#1.0.1
│ │ │ │ │ └── repeat-string#1.6.1
│ │ │ │ └── lazy-cache#1.0.4
│ │ │ ├── right-align#0.1.3
│ │ │ └── wordwrap#0.0.2
│ │ ├── decamelize#1.2.0
│ │ └── window-size#0.1.0
│ ├── void-elements#2.0.1
│ └─┬ with#4.0.3
│ ├── acorn#1.2.2
│ └── acorn-globals#1.0.9
├─┬ mocha#2.5.3
│ ├── commander#2.3.0
│ ├─┬ debug#2.2.0
│ │ └── ms#0.7.1
│ ├── diff#1.4.0
│ ├── escape-string-regexp#1.0.2
│ ├─┬ glob#3.2.11
│ │ └─┬ minimatch#0.3.0
│ │ ├── lru-cache#2.7.3
│ │ └── sigmund#1.0.1
│ ├── growl#1.9.2
│ ├─┬ jade#0.26.3
│ │ ├── commander#0.6.1
│ │ └── mkdirp#0.3.0
│ ├── supports-color#1.2.0
│ └── to-iso-string#0.0.2
├─┬ mongoose#3.9.7
│ ├── async#0.9.0
│ ├── hooks#0.3.2
│ ├── kareem#0.0.4
│ ├─┬ mongodb#1.4.12
│ │ ├─┬ bson#0.2.22
│ │ │ └── nan#1.8.4
│ │ ├── kerberos#0.0.4
│ │ └─┬ readable-stream#2.2.3
│ │ ├── buffer-shims#1.0.0
│ │ ├── core-util-is#1.0.2
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ ├── string_decoder#0.10.31
│ │ └── util-deprecate#1.0.2
│ ├── mpath#0.1.1
│ ├── mpromise#0.5.4
│ ├─┬ mquery#1.0.0
│ │ └── debug#0.7.4
│ ├── ms#0.1.0
│ ├── muri#0.3.1
│ ├── regexp-clone#0.0.1
│ └── sliced#0.0.5
├─┬ morgan#1.8.1
│ └── basic-auth#1.1.0
└─┬ twilio#1.11.1
├── jwt-simple#0.1.0
├── q#0.9.7
├─┬ request#2.27.0
│ ├── aws-sign#0.3.0
│ ├── cookie-jar#0.3.0
│ ├── forever-agent#0.5.2
│ ├─┬ form-data#0.1.4
│ │ ├─┬ combined-stream#0.0.7
│ │ │ └── delayed-stream#0.0.5
│ │ └── mime#1.2.11
│ ├─┬ hawk#1.0.0
│ │ ├── boom#0.4.2
│ │ ├── cryptiles#0.2.2
│ │ ├── hoek#0.9.1
│ │ └── sntp#0.2.4
│ ├─┬ http-signature#0.10.1
│ │ ├── asn1#0.1.11
│ │ ├── assert-plus#0.1.5
│ │ └── ctype#0.5.3
│ ├── json-stringify-safe#5.0.1
│ ├── mime#1.2.11
│ ├── oauth-sign#0.3.0
│ ├── qs#0.6.6
│ └── tunnel-agent#0.3.0
├── scmp#0.0.3
└── underscore#1.8.3
Edit: I changed the title for this question because it seemed more accurate.
So this is my package.json file:
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"express": "~4.0.0",
"static-favicon": "~1.0.0",
"morgan": "~1.0.0",
"cookie-parser": "~1.0.1",
"body-parser": "~1.0.0",
"debug": "~0.7.4",
"jade": "~1.3.0",
"mongodb": "*",
"monk": "*"
}
}
I don't really get an error after hitting npm install but it seems like node didn't install all dependencies. Because when we hit the exact same code on my collegue's pc his promt said a lot more feedback on installed dependencies and it worked fine there.
When i now hit "npm start" it just terminates after a few seconds without any response.
I know there is a bug with node at the moment and i already tried to clear my npm chache and adding the "npm update" command and it still doesn't work.
It seems like its a problem with my pc because, like i said, on my collegue's pc everything worked fine. I hope you have any ideas what could be the problem. Thanks a lot in advance!
Edit: Here's what the npm list command gives me:
├─┬ body-parser#1.0.2
│ ├── qs#0.6.6
│ ├─┬ raw-body#1.1.3
│ │ └── bytes#0.2.1
│ └─┬ type-is#1.1.0
│ └── mime#1.2.11
├─┬ cookie-parser#1.0.1
│ ├── cookie#0.1.0
│ └── cookie-signature#1.0.3
├── debug#0.7.4
├─┬ express#4.0.0
│ ├─┬ accepts#1.0.0
│ │ ├── mime#1.2.11
│ │ └── negotiator#0.3.0
│ ├── buffer-crc32#0.2.1
│ ├── cookie#0.1.0
│ ├── cookie-signature#1.0.3
│ ├── debug#0.8.0
│ ├── escape-html#1.0.1
│ ├── fresh#0.2.2
│ ├── merge-descriptors#0.0.2
│ ├── methods#0.1.0
│ ├── parseurl#1.0.1
│ ├── path-to-regexp#0.1.2
│ ├── qs#0.6.6
│ ├── range-parser#1.0.0
│ ├─┬ send#0.2.0
│ │ ├── debug#0.8.0
│ │ └── mime#1.2.11
│ ├─┬ serve-static#1.0.1
│ │ └─┬ send#0.1.4
│ │ ├── debug#0.8.0
│ │ ├── fresh#0.2.0
│ │ ├── mime#1.2.11
│ │ └── range-parser#0.0.4
│ ├─┬ type-is#1.0.0
│ │ └── mime#1.2.11
│ └── utils-merge#1.0.0
├─┬ jade#1.3.1
│ ├── character-parser#1.2.0
│ ├── commander#2.1.0
│ ├─┬ constantinople#2.0.0
│ │ └─┬ uglify-js#2.4.13
│ │ ├── async#0.2.10
│ │ ├─┬ optimist#0.3.7
│ │ │ └── wordwrap#0.0.2
│ │ ├─┬ source-map#0.1.33
│ │ │ └── amdefine#0.1.0
│ │ └── uglify-to-browserify#1.0.2
│ ├── mkdirp#0.3.5
│ ├─┬ monocle#1.1.51
│ │ └─┬ 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.33
│ │ └── amdefine#0.1.0
│ └─┬ with#3.0.0
│ └─┬ uglify-js#2.4.13
│ ├── async#0.2.10
│ ├─┬ optimist#0.3.7
│ │ └── wordwrap#0.0.2
│ ├─┬ source-map#0.1.33
│ │ └── amdefine#0.1.0
│ └── uglify-to-browserify#1.0.2
├─┬ mongodb#1.4.0
│ ├─┬ bson#0.2.7
│ │ └── nan#0.8.0
│ └── kerberos#0.0.3
├─┬ monk#0.8.1
│ ├── debug#0.8.0
│ ├─┬ mongoskin#0.4.4
│ │ └─┬ mongodb#1.1.11
│ │ └── bson#0.1.5
│ └── mpromise#0.4.4
├─┬ morgan#1.0.0
│ └── bytes#0.2.1
└── static-favicon#1.0.2
So it really looks like the dependencies have been installed (if I'm not completely wrong?). Still my "npm start" command terminates after just a few seconds... any guesses?
If you cleared the npm cache, try also removing all folders in your app's node_modules and run npm install again.
You might want to try starting your app in DEBUG mode and see if it gives you any hint:
DEBUG=express:* node ./bin/www
if the cursor is returning on node app.js(server.js or whatever the name of the js is) like shown below
c:/users/<project-path>:node app.js
c:/users/<project-path>:
Then you might be using express 4 generator
So try the following command
set DEBUG=<project-folder-name>:* & npm start
Not sure if this is resolved or ignored and found a workaround. Just had gone through the problem myself and found out that the problem was not with NodeJS but with one of the dependencies. I failed to install ejs and all my files are ejs based. So I got the same error as you.
So it is best to check if all your dependencies are installed properly.