ts-jest disable babel, babel still appears to be running - node.js

So the docs say it should not be; but I'm seeing this output.
➤ YN0000: [#bb/graph]: [BABEL] Note: The code generator has deoptimised the styling of /home/runner/work/services/services/.pnp.js as it exceeds the max of 500KB.
> yarn info -A '*babel-*' # services -> feature/RS2-1243-logging $ !
├─ babel-jest#npm:26.5.2
│ ├─ Instances: 1
│ ├─ Version: 26.5.2
│ │
│ └─ Dependencies
│ ├─ #jest/transform#npm:^26.5.2 → npm:26.5.2
│ ├─ #jest/types#npm:^26.5.2 → npm:26.5.2
│ ├─ #types/babel__core#npm:^7.1.7 → npm:7.1.9
│ ├─ babel-plugin-istanbul#npm:^6.0.0 → npm:6.0.0
│ ├─ babel-preset-jest#npm:^26.5.0 → npm:26.5.0
│ ├─ chalk#npm:^4.0.0 → npm:4.1.0
│ ├─ graceful-fs#npm:^4.2.4 → npm:4.2.4
│ └─ slash#npm:^3.0.0 → npm:3.0.0
│
├─ babel-plugin-dynamic-import-node#npm:2.3.3
│ ├─ Version: 2.3.3
│ │
│ └─ Dependencies
│ └─ object.assign#npm:^4.1.0 → npm:4.1.0
│
├─ babel-plugin-istanbul#npm:6.0.0
│ ├─ Version: 6.0.0
│ │
│ └─ Dependencies
│ ├─ #babel/helper-plugin-utils#npm:^7.0.0 → npm:7.10.4
│ ├─ #istanbuljs/load-nyc-config#npm:^1.0.0 → npm:1.1.0
│ ├─ #istanbuljs/schema#npm:^0.1.2 → npm:0.1.2
│ ├─ istanbul-lib-instrument#npm:^4.0.0 → npm:4.0.3
│ └─ test-exclude#npm:^6.0.0 → npm:6.0.0
│
├─ babel-plugin-jest-hoist#npm:26.5.0
│ ├─ Version: 26.5.0
│ │
│ └─ Dependencies
│ ├─ #babel/template#npm:^7.3.3 → npm:7.10.4
│ ├─ #babel/types#npm:^7.3.3 → npm:7.11.5
│ ├─ #types/babel__core#npm:^7.0.0 → npm:7.1.9
│ └─ #types/babel__traverse#npm:^7.0.6 → npm:7.0.13
│
├─ babel-plugin-syntax-trailing-function-commas#npm:7.0.0-beta.0
│ └─ Version: 7.0.0-beta.0
│
├─ babel-preset-current-node-syntax#npm:0.1.3
│ ├─ Instances: 1
│ ├─ Version: 0.1.3
│ │
│ └─ Dependencies
│ ├─ #babel/plugin-syntax-async-generators#npm:^7.8.4 → npm:7.8.4
│ ├─ #babel/plugin-syntax-bigint#npm:^7.8.3 → npm:7.8.3
│ ├─ #babel/plugin-syntax-class-properties#npm:^7.8.3 → npm:7.10.4
│ ├─ #babel/plugin-syntax-import-meta#npm:^7.8.3 → npm:7.10.4
│ ├─ #babel/plugin-syntax-json-strings#npm:^7.8.3 → npm:7.8.3
│ ├─ #babel/plugin-syntax-logical-assignment-operators#npm:^7.8.3 → npm:7.10.4
│ ├─ #babel/plugin-syntax-nullish-coalescing-operator#npm:^7.8.3 → npm:7.8.3
│ ├─ #babel/plugin-syntax-numeric-separator#npm:^7.8.3 → npm:7.10.4
│ ├─ #babel/plugin-syntax-object-rest-spread#npm:^7.8.3 → npm:7.8.3
│ ├─ #babel/plugin-syntax-optional-catch-binding#npm:^7.8.3 → npm:7.8.3
│ └─ #babel/plugin-syntax-optional-chaining#npm:^7.8.3 → npm:7.8.3
│
├─ babel-preset-fbjs#npm:3.3.0
│ ├─ Instances: 1
│ ├─ Version: 3.3.0
│ │
│ └─ Dependencies
│ ├─ #babel/plugin-proposal-class-properties#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-proposal-object-rest-spread#npm:^7.0.0 → npm:7.11.0
│ ├─ #babel/plugin-syntax-class-properties#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-syntax-flow#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-syntax-jsx#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-syntax-object-rest-spread#npm:^7.0.0 → npm:7.8.3
│ ├─ #babel/plugin-transform-arrow-functions#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-block-scoped-functions#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-block-scoping#npm:^7.0.0 → npm:7.11.1
│ ├─ #babel/plugin-transform-classes#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-computed-properties#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-destructuring#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-flow-strip-types#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-for-of#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-function-name#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-literals#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-member-expression-literals#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-modules-commonjs#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-object-super#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-parameters#npm:^7.0.0 → npm:7.10.5
│ ├─ #babel/plugin-transform-property-literals#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-react-display-name#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-react-jsx#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-shorthand-properties#npm:^7.0.0 → npm:7.10.4
│ ├─ #babel/plugin-transform-spread#npm:^7.0.0 → npm:7.11.0
│ ├─ #babel/plugin-transform-template-literals#npm:^7.0.0 → npm:7.10.5
│ └─ babel-plugin-syntax-trailing-function-commas#npm:^7.0.0-beta.0 → npm:7.0.0-beta.0
│
└─ babel-preset-jest#npm:26.5.0
├─ Instances: 1
├─ Version: 26.5.0
│
└─ Dependencies
├─ babel-plugin-jest-hoist#npm:^26.5.0 → npm:26.5.0
└─ babel-preset-current-node-syntax#npm:^0.1.3 → npm:0.1.3
> yarn why -R 'babel-jest' # services -> feature/RS2-1243-logging $ !
├─ #bb/apollo-test-util#workspace:app-lib/graph/packages/apollo-test-util
│ └─ jest#npm:26.5.2 (via npm:^26.5.2)
│ ├─ #jest/core#npm:26.5.2 (via npm:^26.5.2)
│ │ └─ jest-config#npm:26.5.2 (via npm:^26.5.2)
│ │ └─ babel-jest#npm:26.5.2 [dc086] (via npm:^26.5.2 [dc086])
│ └─ jest-cli#npm:26.5.2 (via npm:^26.5.2)
│ ├─ #jest/core#npm:26.5.2 (via npm:^26.5.2)
│ └─ jest-config#npm:26.5.2 (via npm:^26.5.2)
│
├─ #bb/app-lib#workspace:app-lib
│ └─ jest#npm:26.5.2 (via npm:^26.5.2)
│
├─ #bb/graph#workspace:app-lib/graph/packages/app
│ ├─ #bb/apollo-test-util#workspace:app-lib/graph/packages/apollo-test-util (via workspace:app-lib/graph/packages/apollo-test-util)
│ └─ jest#npm:26.5.2 (via npm:^26.5.2)
│
└─ #bb/test-apollo-configuration#workspace:app-lib/graph/packages/test-apollo-configuration
└─ #bb/apollo-test-util#workspace:app-lib/graph/packages/apollo-test-util (via workspace:app-lib/graph/packages/
is there any way with yarn2 I can just remove babel safely? or barring that completely prevent it from running?

Related

Can't install Gulp even after $sudo command

I've been trying to install gulp using sudo command on my mac but it doesn't seem to work out. I have successfully installed node before. I paste all the things happening on my screen below. After all these text. I typed gulp -v command in my terminal and gulp hasn't installed. >>> -bash: gulp: command not found
What should I do?
Thank you so much in advance!!!
sudo npm install gulp -f
Password:
npm WARN using --force I sure hope you know what you are doing.
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
/Users/macbook
└─┬ gulp#3.9.1
├── archy#1.0.0
├─┬ chalk#1.1.3
│ ├── ansi-styles#2.2.1
│ ├── escape-string-regexp#1.0.5
│ ├─┬ has-ansi#2.0.0
│ │ └── ansi-regex#2.1.1
│ ├── strip-ansi#3.0.1
│ └── supports-color#2.0.0
├── deprecated#0.0.1
├─┬ gulp-util#3.0.8
│ ├── array-differ#1.0.0
│ ├── array-uniq#1.0.3
│ ├── beeper#1.1.1
│ ├── dateformat#2.0.0
│ ├─┬ fancy-log#1.3.0
│ │ └── time-stamp#1.0.1
│ ├─┬ gulplog#1.0.0
│ │ └── glogg#1.0.0
│ ├─┬ has-gulplog#0.1.0
│ │ └── sparkles#1.0.0
│ ├── lodash._reescape#3.0.0
│ ├── lodash._reevaluate#3.0.0
│ ├── lodash._reinterpolate#3.0.0
│ ├─┬ lodash.template#3.6.2
│ │ ├── lodash._basecopy#3.0.1
│ │ ├── lodash._basetostring#3.0.1
│ │ ├── lodash._basevalues#3.0.0
│ │ ├── lodash._isiterateecall#3.0.9
│ │ ├─┬ lodash.escape#3.2.0
│ │ │ └── lodash._root#3.0.1
│ │ ├─┬ lodash.keys#3.1.2
│ │ │ ├── lodash._getnative#3.9.1
│ │ │ ├── lodash.isarguments#3.1.0
│ │ │ └── lodash.isarray#3.0.4
│ │ ├── lodash.restparam#3.6.1
│ │ └── lodash.templatesettings#3.1.1
│ ├─┬ multipipe#0.1.2
│ │ └─┬ duplexer2#0.0.2
│ │ └── readable-stream#1.1.14
│ ├── object-assign#3.0.0
│ ├── replace-ext#0.0.1
│ ├─┬ through2#2.0.3
│ │ ├─┬ readable-stream#2.2.9
│ │ │ ├── buffer-shims#1.0.0
│ │ │ ├── core-util-is#1.0.2
│ │ │ ├── inherits#2.0.3
│ │ │ ├── isarray#1.0.0
│ │ │ ├── process-nextick-args#1.0.7
│ │ │ ├── string_decoder#1.0.0
│ │ │ └── util-deprecate#1.0.2
│ │ └── xtend#4.0.1
│ └─┬ vinyl#0.5.3
│ ├── clone#1.0.2
│ └── clone-stats#0.0.1
├── interpret#1.0.3
├─┬ liftoff#2.3.0
│ ├── extend#3.0.1
│ ├─┬ findup-sync#0.4.3
│ │ ├─┬ detect-file#0.1.0
│ │ │ └── fs-exists-sync#0.1.0
│ │ ├─┬ is-glob#2.0.1
│ │ │ └── is-extglob#1.0.0
│ │ ├─┬ micromatch#2.3.11
│ │ │ ├─┬ arr-diff#2.0.0
│ │ │ │ └── arr-flatten#1.0.3
│ │ │ ├── array-unique#0.2.1
│ │ │ ├─┬ braces#1.8.5
│ │ │ │ ├─┬ expand-range#1.8.2
│ │ │ │ │ └─┬ fill-range#2.2.3
│ │ │ │ │ ├── is-number#2.1.0
│ │ │ │ │ ├─┬ isobject#2.1.0
│ │ │ │ │ │ └── isarray#1.0.0
│ │ │ │ │ ├── randomatic#1.1.6
│ │ │ │ │ └── repeat-string#1.6.1
│ │ │ │ ├── preserve#0.2.0
│ │ │ │ └── repeat-element#1.1.2
│ │ │ ├─┬ expand-brackets#0.1.5
│ │ │ │ └── is-posix-bracket#0.1.1
│ │ │ ├── extglob#0.3.2
│ │ │ ├── filename-regex#2.0.1
│ │ │ ├─┬ kind-of#3.2.0
│ │ │ │ └── is-buffer#1.1.5
│ │ │ ├─┬ normalize-path#2.1.1
│ │ │ │ └── remove-trailing-separator#1.0.1
│ │ │ ├─┬ object.omit#2.0.1
│ │ │ │ ├─┬ for-own#0.1.5
│ │ │ │ │ └── for-in#1.0.2
│ │ │ │ └── is-extendable#0.1.1
│ │ │ ├─┬ parse-glob#3.0.4
│ │ │ │ ├─┬ glob-base#0.3.0
│ │ │ │ │ └── glob-parent#2.0.0
│ │ │ │ └── is-dotfile#1.0.2
│ │ │ └─┬ regex-cache#0.4.3
│ │ │ ├── is-equal-shallow#0.1.3
│ │ │ └── is-primitive#2.0.0
│ │ └─┬ resolve-dir#0.1.1
│ │ └─┬ global-modules#0.2.3
│ │ ├─┬ global-prefix#0.1.5
│ │ │ ├─┬ homedir-polyfill#1.0.1
│ │ │ │ └── parse-passwd#1.0.0
│ │ │ ├── ini#1.3.4
│ │ │ └─┬ which#1.2.14
│ │ │ └── isexe#2.0.0
│ │ └── is-windows#0.2.0
│ ├─┬ fined#1.0.2
│ │ ├── expand-tilde#1.2.2
│ │ ├── lodash.assignwith#4.2.0
│ │ ├── lodash.isempty#4.4.0
│ │ ├── lodash.pick#4.4.0
│ │ └─┬ parse-filepath#1.0.1
│ │ ├─┬ is-absolute#0.2.6
│ │ │ └─┬ is-relative#0.2.1
│ │ │ └─┬ is-unc-path#0.1.2
│ │ │ └── unc-path-regex#0.1.2
│ │ ├── map-cache#0.2.2
│ │ └─┬ path-root#0.1.1
│ │ └── path-root-regex#0.1.2
│ ├── flagged-respawn#0.3.2
│ ├── lodash.isplainobject#4.0.6
│ ├── lodash.isstring#4.0.1
│ ├── lodash.mapvalues#4.6.0
│ ├── rechoir#0.6.2
│ └─┬ resolve#1.3.3
│ └── path-parse#1.0.5
├── minimist#1.2.0
├─┬ orchestrator#0.3.8
│ ├─┬ end-of-stream#0.1.5
│ │ └─┬ once#1.3.3
│ │ └── wrappy#1.0.2
│ ├── sequencify#0.0.7
│ └── stream-consume#0.1.0
├── pretty-hrtime#1.0.3
├── semver#4.3.6
├─┬ tildify#1.2.0
│ └── os-homedir#1.0.2
├─┬ v8flags#2.1.1
│ └── user-home#1.1.1
└─┬ vinyl-fs#0.3.14
├── defaults#1.0.3
├─┬ glob-stream#3.1.18
│ ├─┬ glob#4.5.3
│ │ └── inflight#1.0.6
│ ├─┬ glob2base#0.0.12
│ │ └── find-index#0.1.1
│ ├─┬ minimatch#2.0.10
│ │ └─┬ brace-expansion#1.1.7
│ │ ├── balanced-match#0.4.2
│ │ └── concat-map#0.0.1
│ ├── ordered-read-streams#0.1.0
│ ├─┬ through2#0.6.5
│ │ └── readable-stream#1.0.34
│ └── unique-stream#1.0.0
├─┬ glob-watcher#0.0.6
│ └─┬ gaze#0.5.2
│ └─┬ globule#0.1.0
│ ├─┬ glob#3.1.21
│ │ ├── graceful-fs#1.2.3
│ │ └── inherits#1.0.2
│ ├── lodash#1.0.2
│ └─┬ minimatch#0.2.14
│ ├── lru-cache#2.7.3
│ └── sigmund#1.0.1
├─┬ graceful-fs#3.0.11
│ └── natives#1.1.0
├─┬ mkdirp#0.5.1
│ └── minimist#0.0.8
├─┬ strip-bom#1.0.0
│ ├── first-chunk-stream#1.0.0
│ └── is-utf8#0.2.1
├─┬ through2#0.6.5
│ └─┬ readable-stream#1.0.34
│ ├── isarray#0.0.1
│ └── string_decoder#0.10.31
└─┬ vinyl#0.4.6
└── clone#0.2.0
npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
npm WARN macbook No description
npm WARN macbook No repository field.
npm WARN macbook No README data
npm WARN macbook No license field.
Macbooks-MBP:~ Lililashka$ gulp -v
-bash: gulp: command not found
Macbooks-MBP:~ Lililashka$ npm uninstall -g gulp
Macbooks-MBP:~ Lililashka$ npm uninstall package-name
npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
npm WARN macbook No description
npm WARN macbook No repository field.
npm WARN macbook No README data
npm WARN macbook No license field.
Macbooks-MBP:~ Lililashka$ npm uninstall -D package-name
npm WARN saveError ENOENT: no such file or directory, open '/Users/macbook/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/macbook/package.json'
npm WARN macbook No description
npm WARN macbook No repository field.
npm WARN macbook No README data
npm WARN macbook No license field.
You need to install Gulp globally before installing it into a project
sudo npm install -g gulp

Twilio SMS Marketing node . command won't start app gives throw error mac

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

Passenger + Nginx + Node (Meteor) 100% CPU usage

I have a Meteor app deployed with Passenger + Nginx (as follow) on AWS EC2 instance under Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-62-generic x86_64)
The problem is that it takes around 100% CPU usage permanently.
I've tried to switch to more powerful instance and even deployed a blank app instead of mine - still the same.
Any ideas where to dig?
Thanks.
P.S.
var/log/nginx/error.log:
2017/02/08 08:04:20 [info] 18232#18232: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:71
[ 2017-02-08 08:04:20.4123 18239/7fe378ac0780 age/Wat/WatchdogMain.cpp:1281 ]: Starting Passenger watchdog...
[ 2017-02-08 08:04:20.4281 18242/7f7adea7b780 age/Cor/CoreMain.cpp:1070 ]: Starting Passenger core...
[ 2017-02-08 08:04:20.4282 18242/7f7adea7b780 age/Cor/CoreMain.cpp:245 ]: Passenger core running in multi-application mode.
[ 2017-02-08 08:04:20.4309 18242/7f7adea7b780 age/Cor/CoreMain.cpp:820 ]: Passenger core online, PID 18242
[ 2017-02-08 08:04:20.4511 18248/7fdc44af6780 age/Ust/UstRouterMain.cpp:529 ]: Starting Passenger UstRouter...
[ 2017-02-08 08:04:20.4517 18248/7fdc44af6780 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 18248
[ 2017-02-08 08:04:22.7236 18242/7f7ade98c700 age/Cor/SecurityUpdateChecker.h:464 ]: Security update check: no update found (next check in 24 hours)
npm install output:
> fibers#1.0.15 install /var/www/play/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js
`linux-x64-48` exists; testing
Binary is fine; exiting
> meteor-dev-bundle#0.0.0 install /var/www/play/bundle/programs/server
> node npm-rebuild.js
{
"meteor-dev-bundle": "0.0.0",
"npm": "3.10.10",
"ares": "1.10.1-DEV",
"http_parser": "2.7.0",
"icu": "56.1",
"modules": "48",
"node": "6.9.5",
"openssl": "1.0.2k",
"uv": "1.9.1",
"v8": "5.1.281.89",
"zlib": "1.2.8"
}
meteor-dev-bundle#0.0.0 /var/www/play/bundle/programs/server
├── amdefine#1.0.1
├── asap#2.0.5
├── fibers#1.0.15
├── meteor-promise#0.8.0
├─┬ node-gyp#3.4.0
│ ├─┬ fstream#1.0.10
│ │ └── inherits#2.0.3
│ ├─┬ glob#7.1.1
│ │ ├── fs.realpath#1.0.0
│ │ ├─┬ inflight#1.0.6
│ │ │ └── wrappy#1.0.2
│ │ ├── once#1.4.0
│ │ └── path-is-absolute#1.0.1
│ ├── graceful-fs#4.1.11
│ ├─┬ minimatch#3.0.3
│ │ └─┬ brace-expansion#1.1.6
│ │ ├── balanced-match#0.4.2
│ │ └── concat-map#0.0.1
│ ├─┬ mkdirp#0.5.1
│ │ └── minimist#0.0.8
│ ├─┬ nopt#3.0.6
│ │ └── abbrev#1.0.9
│ ├─┬ npmlog#3.1.2
│ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ ├── delegates#1.0.0
│ │ │ └── readable-stream#2.2.2
│ │ ├── console-control-strings#1.1.0
│ │ ├─┬ gauge#2.6.0
│ │ │ ├── aproba#1.1.0
│ │ │ ├── has-color#0.1.7
│ │ │ ├── has-unicode#2.0.1
│ │ │ ├── object-assign#4.1.1
│ │ │ ├── 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
│ │ │ ├─┬ strip-ansi#3.0.1
│ │ │ │ └── ansi-regex#2.1.1
│ │ │ └── wide-align#1.1.0
│ │ └── set-blocking#2.0.0
│ ├─┬ osenv#0.1.4
│ │ ├── os-homedir#1.0.2
│ │ └── os-tmpdir#1.0.2
│ ├─┬ path-array#1.0.1
│ │ └─┬ array-index#1.0.0
│ │ ├─┬ debug#2.6.0
│ │ │ └── ms#0.7.2
│ │ └─┬ es6-symbol#3.1.0
│ │ ├── d#0.1.1
│ │ └─┬ es5-ext#0.10.12
│ │ └── es6-iterator#2.0.0
│ ├─┬ request#2.79.0
│ │ ├── aws-sign2#0.6.0
│ │ ├── aws4#1.6.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.1
│ │ │ │ └── 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.2
│ │ │ ├── asn1#0.2.3
│ │ │ ├── assert-plus#1.0.0
│ │ │ ├── bcrypt-pbkdf#1.0.1
│ │ │ ├─┬ dashdash#1.14.1
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── ecc-jsbn#0.1.1
│ │ │ ├─┬ getpass#0.1.6
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── jodid25519#1.0.2
│ │ │ ├── jsbn#0.1.0
│ │ │ └── tweetnacl#0.14.5
│ │ ├── is-typedarray#1.0.0
│ │ ├── isstream#0.1.2
│ │ ├── json-stringify-safe#5.0.1
│ │ ├─┬ mime-types#2.1.14
│ │ │ └── mime-db#1.26.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
│ │ └── uuid#3.0.1
│ ├── rimraf#2.5.4
│ ├─┬ tar#2.2.1
│ │ └── block-stream#0.0.9
│ └─┬ which#1.2.12
│ └── isexe#1.1.2
├─┬ node-pre-gyp#0.6.29
│ ├─┬ rc#1.1.6
│ │ ├── deep-extend#0.4.1
│ │ ├── ini#1.3.4
│ │ ├── minimist#1.2.0
│ │ └── strip-json-comments#1.0.4
│ ├── semver#5.2.0
│ └─┬ tar-pack#3.1.4
│ ├─┬ debug#2.2.0
│ │ └── ms#0.7.1
│ ├── fstream-ignore#1.0.5
│ ├── once#1.3.3
│ ├─┬ readable-stream#2.1.5
│ │ ├── 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
│ └── uid-number#0.0.6
├── promise#7.1.1
├── semver#4.1.0
├── source-map#0.1.32
├── source-map-support#0.3.2
└── underscore#1.5.2
npm WARN meteor-dev-bundle#0.0.0 No description
npm WARN meteor-dev-bundle#0.0.0 No repository field.
npm WARN meteor-dev-bundle#0.0.0 No license field.
According to the Meteor deployment guide, you have to use specifically Node 4.6.2.
Depending on the version of Meteor you are using, you should install
the proper version of node using the appropriate installation process
for your platform.
Node 4.6.2 for Meteor 1.4.x
Node 0.10.43 for Meteor 1.3.x and earlier
If you use a mismatched version of Node when deploying your
application, you will encounter errors!
Passenger docs also suggest a 4.x version of node.
It worked for me with node js v4.8.4. Now CPU rarely goes above 10%.
Fixed it by reinstalling everything from the scratch. Still don't know what happend.
It's happening again, approximately once per day:
Wonder if there is some alternative for Passenger + Nginx?
Node version as mentioned in above answers strictly matters. You can try installing nginx+ pm2. It works like charm. To know more about pm2 , I already answered here.
How to run built of Meteor's sample app via Node

Karma PhantomJs - TypeError on Linux and on Win 7 all tests succeed

I am running the commands
npm install karma karma-jasmine karma-phantomjs-launcher phantomjs#2.1.7 jasmine-core --save-dev
karma start
on my Linux CentOs 7.2 machine and get this error:
bower_components/angular/angular.js:4641:53
forEach#bower_components/angular/angular.js:321:24
loadModules#bower_components/angular/angular.js:4601:12
createInjector#bower_components/angular/angular.js:4523:30
workFn#vendor/angular-mocks.js:2427:60
TypeError: undefined is not an object (evaluating '$rootScope.$new') in my-components/my-specific-component/spec/mySpecificController.spec.js (line 84)
createController#my-components/my-specific-component/spec/mySpecificController.spec.js:84:37
my-components/my-specific-component/spec/mySpecificController.spec.js:92:42
(...10 more tests failing in the same spec...)
PhantomJS 2.1.1 (Linux 0.0.0): Executed 54 of 54 (11 FAILED) (0.349 secs / 1.251 secs)
I run the exact same command on my Windows 7 machine and all tests complete successfully:
PhantomJS 2.1.1 (Windows 7 0.0.0): Executed 54 of 54 SUCCESS (0.152 secs / 1.102 secs)
I checked the versions of the installed npm:
Win 7 ---> npm 2.15.1
CentOs 7.2 ---> npm 3.10.3
Comment: Shouldn't be a showstopper, shouldn't it?
Installed modules in npm on Win 7:
myuser#mycomputer MINGW64 /c/Users/myuser/IdeaProjects/my_project/src/main/webapp (feature/some-feature)
$ npm ls --global
C:\Users\myuser\AppData\Roaming\npm
├── bower#1.7.9
└─┬ karma-cli#1.0.1
└── resolve#1.1.7
Installed npm modules in CentOs7:
[root#localhost webapp]# npm ls --global
/usr/lib
├── ansi#0.2.1
├── bower#1.7.9
├─┬ karma-cli#1.0.1
│ └── resolve#1.1.7
├─┬ npm#3.10.3
│ ├── abbrev#1.0.9 -> /usr/lib/node_modules/npm/node_modules.bundled/abbrev
│ ├── ansi-regex#2.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/ansi-regex
│ ├── ansicolors#0.3.2 -> /usr/lib/node_modules/npm/node_modules.bundled/ansicolors
│ ├── ansistyles#0.1.3 -> /usr/lib/node_modules/npm/node_modules.bundled/ansistyles
│ ├── aproba#1.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/aproba
│ ├── archy#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/archy
│ ├── asap#2.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/asap
│ ├── chownr#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/chownr
│ ├── cmd-shim#2.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/cmd-shim
│ ├─┬ columnify#1.5.4 -> /usr/lib/node_modules/npm/node_modules.bundled/columnify
│ │ └─┬ wcwidth#1.0.0
│ │ └─┬ defaults#1.0.3
│ │ └── clone#1.0.2
│ ├─┬ config-chain#1.1.10 -> /usr/lib/node_modules/npm/node_modules.bundled/config-chain
│ │ └── proto-list#1.2.4
│ ├── debuglog#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/debuglog
│ ├── dezalgo#1.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/dezalgo
│ ├── editor#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/editor
│ ├── fs-vacuum#1.2.9 -> /usr/lib/node_modules/npm/node_modules.bundled/fs-vacuum
│ ├── fs-write-stream-atomic#1.0.8 -> /usr/lib/node_modules/npm/node_modules.bundled/fs-write-stream-atomic
│ ├── fstream#1.0.10 -> /usr/lib/node_modules/npm/node_modules.bundled/fstream
│ ├─┬ fstream-npm#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/fstream-npm
│ │ └─┬ fstream-ignore#1.0.5
│ │ └─┬ minimatch#3.0.0
│ │ └─┬ brace-expansion#1.1.4
│ │ ├── balanced-match#0.4.1
│ │ └── concat-map#0.0.1
│ ├─┬ glob#7.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/glob
│ │ ├── fs.realpath#1.0.0
│ │ ├─┬ minimatch#3.0.0
│ │ │ └─┬ brace-expansion#1.1.5
│ │ │ ├── balanced-match#0.4.1
│ │ │ └── concat-map#0.0.1
│ │ └── path-is-absolute#1.0.0
│ ├── graceful-fs#4.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/graceful-fs
│ ├── has-unicode#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/has-unicode
│ ├── hosted-git-info#2.1.5 -> /usr/lib/node_modules/npm/node_modules.bundled/hosted-git-info
│ ├── iferr#0.1.5 -> /usr/lib/node_modules/npm/node_modules.bundled/iferr
│ ├── imurmurhash#0.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/imurmurhash
│ ├── inflight#1.0.5 -> /usr/lib/node_modules/npm/node_modules.bundled/inflight
│ ├── inherits#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/inherits
│ ├── ini#1.3.4 -> /usr/lib/node_modules/npm/node_modules.bundled/ini
│ ├─┬ init-package-json#1.9.4 -> /usr/lib/node_modules/npm/node_modules.bundled/init-package-json
│ │ ├─┬ glob#6.0.4
│ │ │ ├─┬ minimatch#3.0.0
│ │ │ │ └─┬ brace-expansion#1.1.4
│ │ │ │ ├── balanced-match#0.4.1
│ │ │ │ └── concat-map#0.0.1
│ │ │ └── path-is-absolute#1.0.0
│ │ └── promzard#0.3.0
│ ├── lockfile#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lockfile
│ ├── lodash._baseindexof#3.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._baseindexof
│ ├─┬ lodash._baseuniq#4.6.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._baseuniq
│ │ ├── lodash._createset#4.0.3
│ │ └── lodash._root#3.0.1
│ ├── lodash._bindcallback#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._bindcallback
│ ├── lodash._cacheindexof#3.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._cacheindexof
│ ├── lodash._createcache#3.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._createcache
│ ├── lodash._getnative#3.9.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash._getnative
│ ├─┬ lodash.clonedeep#4.3.2 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.clonedeep
│ │ └── lodash._baseclone#4.5.3
│ ├── lodash.restparam#3.6.1 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.restparam
│ ├─┬ lodash.union#4.4.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.union
│ │ ├── lodash._baseflatten#4.2.1
│ │ └── lodash.rest#4.0.3
│ ├── lodash.uniq#4.3.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.uniq
│ ├─┬ lodash.without#4.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/lodash.without
│ │ ├─┬ lodash._basedifference#4.5.0
│ │ │ └── lodash._root#3.0.1
│ │ └── lodash.rest#4.0.3
│ ├─┬ mkdirp#0.5.1 -> /usr/lib/node_modules/npm/node_modules.bundled/mkdirp
│ │ └── minimist#0.0.8
│ ├─┬ node-gyp#3.3.1 -> /usr/lib/node_modules/npm/node_modules.bundled/node-gyp
│ │ ├─┬ glob#4.5.3
│ │ │ └─┬ minimatch#2.0.10
│ │ │ └─┬ brace-expansion#1.1.3
│ │ │ ├── balanced-match#0.3.0
│ │ │ └── concat-map#0.0.1
│ │ ├─┬ minimatch#1.0.0
│ │ │ ├── lru-cache#2.7.3
│ │ │ └── sigmund#1.0.1
│ │ ├─┬ npmlog#2.0.4
│ │ │ ├── ansi#0.3.1
│ │ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ │ └── delegates#1.0.0
│ │ │ └─┬ gauge#1.2.7
│ │ │ ├─┬ lodash.pad#4.4.0
│ │ │ │ ├── lodash._baseslice#4.0.0
│ │ │ │ ├── lodash._basetostring#4.12.0
│ │ │ │ └── lodash.tostring#4.1.3
│ │ │ ├─┬ lodash.padend#4.5.0
│ │ │ │ ├── lodash._baseslice#4.0.0
│ │ │ │ ├── lodash._basetostring#4.12.0
│ │ │ │ └── lodash.tostring#4.1.3
│ │ │ └─┬ lodash.padstart#4.5.0
│ │ │ ├── lodash._baseslice#4.0.0
│ │ │ ├── lodash._basetostring#4.12.0
│ │ │ └── lodash.tostring#4.1.3
│ │ └─┬ path-array#1.0.1
│ │ └─┬ array-index#1.0.0
│ │ ├─┬ debug#2.2.0
│ │ │ └── ms#0.7.1
│ │ └─┬ es6-symbol#3.0.2
│ │ ├── d#0.1.1
│ │ └─┬ es5-ext#0.10.11
│ │ └── es6-iterator#2.0.0
│ ├── nopt#3.0.6 -> /usr/lib/node_modules/npm/node_modules.bundled/nopt
│ ├── normalize-git-url#3.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/normalize-git-url
│ ├─┬ normalize-package-data#2.3.5 -> /usr/lib/node_modules/npm/node_modules.bundled/normalize-package-data
│ │ └─┬ is-builtin-module#1.0.0
│ │ └── builtin-modules#1.1.1
│ ├── npm-cache-filename#1.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-cache-filename
│ ├── npm-install-checks#3.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-install-checks
│ ├── npm-package-arg#4.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-package-arg
│ ├─┬ npm-registry-client#7.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-registry-client
│ │ ├─┬ concat-stream#1.5.1
│ │ │ ├─┬ 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
│ │ └── retry#0.8.0
│ ├── npm-user-validate#0.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/npm-user-validate
│ ├─┬ npmlog#3.1.2 -> /usr/lib/node_modules/npm/node_modules.bundled/npmlog
│ │ ├─┬ are-we-there-yet#1.1.2
│ │ │ └── delegates#1.0.0
│ │ ├── console-control-strings#1.1.0
│ │ ├─┬ gauge#2.6.0
│ │ │ ├── has-color#0.1.7
│ │ │ ├── object-assign#4.1.0
│ │ │ ├── signal-exit#3.0.0
│ │ │ ├─┬ string-width#1.0.1
│ │ │ │ ├─┬ code-point-at#1.0.0
│ │ │ │ │ └── number-is-nan#1.0.0
│ │ │ │ └─┬ is-fullwidth-code-point#1.0.0
│ │ │ │ └── number-is-nan#1.0.0
│ │ │ └── wide-align#1.1.0
│ │ └── set-blocking#2.0.0
│ ├── once#1.3.3 -> /usr/lib/node_modules/npm/node_modules.bundled/once
│ ├── opener#1.4.1 -> /usr/lib/node_modules/npm/node_modules.bundled/opener
│ ├─┬ osenv#0.1.3 -> /usr/lib/node_modules/npm/node_modules.bundled/osenv
│ │ ├── os-homedir#1.0.1
│ │ └── os-tmpdir#1.0.1
│ ├── path-is-inside#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/path-is-inside
│ ├─┬ read#1.0.7 -> /usr/lib/node_modules/npm/node_modules.bundled/read
│ │ └── mute-stream#0.0.5
│ ├── read-cmd-shim#1.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/read-cmd-shim
│ ├─┬ read-installed#4.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/read-installed
│ │ └── util-extend#1.0.3
│ ├─┬ read-package-json#2.0.4 -> /usr/lib/node_modules/npm/node_modules.bundled/read-package-json
│ │ ├─┬ glob#6.0.4
│ │ │ ├─┬ minimatch#3.0.0
│ │ │ │ └─┬ brace-expansion#1.1.3
│ │ │ │ ├── balanced-match#0.3.0
│ │ │ │ └── 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 -> /usr/lib/node_modules/npm/node_modules.bundled/read-package-tree
│ ├─┬ readable-stream#2.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/readable-stream
│ │ ├── 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 -> /usr/lib/node_modules/npm/node_modules.bundled/readdir-scoped-modules
│ ├── realize-package-specifier#3.0.3 -> /usr/lib/node_modules/npm/node_modules.bundled/realize-package-specifier
│ ├─┬ request#2.72.0 -> /usr/lib/node_modules/npm/node_modules.bundled/request
│ │ ├── aws-sign2#0.6.0
│ │ ├─┬ aws4#1.3.2
│ │ │ └─┬ lru-cache#4.0.1
│ │ │ ├── pseudomap#1.0.2
│ │ │ └── yallist#2.0.0
│ │ ├─┬ bl#1.1.2
│ │ │ └─┬ readable-stream#2.0.6
│ │ │ ├── core-util-is#1.0.2
│ │ │ ├── isarray#1.0.0
│ │ │ ├── process-nextick-args#1.0.6
│ │ │ ├── string_decoder#0.10.31
│ │ │ └── util-deprecate#1.0.2
│ │ ├── 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#1.0.0-rc4
│ │ │ └── async#1.5.2
│ │ ├─┬ 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.13.1
│ │ │ │ ├── generate-function#2.0.0
│ │ │ │ ├─┬ generate-object-property#1.2.0
│ │ │ │ │ └── is-property#1.0.2
│ │ │ │ ├── jsonpointer#2.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.2.2
│ │ │ │ ├── extsprintf#1.0.2
│ │ │ │ ├── json-schema#0.2.2
│ │ │ │ └── verror#1.3.6
│ │ │ └─┬ sshpk#1.7.4
│ │ │ ├── asn1#0.2.3
│ │ │ ├─┬ dashdash#1.13.0
│ │ │ │ └── assert-plus#1.0.0
│ │ │ ├── ecc-jsbn#0.1.1
│ │ │ ├── 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.10
│ │ │ └── mime-db#1.22.0
│ │ ├── node-uuid#1.4.7
│ │ ├── oauth-sign#0.8.1
│ │ ├── qs#6.1.0
│ │ ├── stringstream#0.0.5
│ │ ├── tough-cookie#2.2.2
│ │ └── tunnel-agent#0.4.2
│ ├── retry#0.9.0 -> /usr/lib/node_modules/npm/node_modules.bundled/retry
│ ├── rimraf#2.5.2 -> /usr/lib/node_modules/npm/node_modules.bundled/rimraf
│ ├── semver#5.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/semver
│ ├── sha#2.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/sha
│ ├── slide#1.1.6 -> /usr/lib/node_modules/npm/node_modules.bundled/slide
│ ├── sorted-object#2.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/sorted-object
│ ├── strip-ansi#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/strip-ansi
│ ├─┬ tar#2.2.1 -> /usr/lib/node_modules/npm/node_modules.bundled/tar
│ │ └── block-stream#0.0.8
│ ├── text-table#0.2.0 -> /usr/lib/node_modules/npm/node_modules.bundled/text-table
│ ├── uid-number#0.0.6 -> /usr/lib/node_modules/npm/node_modules.bundled/uid-number
│ ├── umask#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/umask
│ ├─┬ unique-filename#1.1.0 -> /usr/lib/node_modules/npm/node_modules.bundled/unique-filename
│ │ └── unique-slug#2.0.0
│ ├── unpipe#1.0.0 -> /usr/lib/node_modules/npm/node_modules.bundled/unpipe
│ ├─┬ validate-npm-package-license#3.0.1 -> /usr/lib/node_modules/npm/node_modules.bundled/validate-npm-package-license
│ │ ├─┬ 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 -> /usr/lib/node_modules/npm/node_modules.bundled/validate-npm-package-name
│ │ └── builtins#0.0.7
│ ├─┬ which#1.2.10 -> /usr/lib/node_modules/npm/node_modules.bundled/which
│ │ └── isexe#1.1.2
│ ├── wrappy#1.0.2 -> /usr/lib/node_modules/npm/node_modules.bundled/wrappy
│ └── write-file-atomic#1.1.4 -> /usr/lib/node_modules/npm/node_modules.bundled/write-file-atomic
└── which#1.0.5
Why do the Specs behave differently on the two platforms?
I am using grunt (with yeoman), and I added bower components via this command:
bower install `package_name` --save
This will add them into the index.html and karma.conf.js automatically. But there is a component named adm-dtp which was not added automatically (even when I used above command). I add this manually to karma.conf.js and everything works.
So the generic answer should be check karma.conf.js and be sure that everything is loaded correctly. this link is related. And if you use grunt and yeoman add them after //end bower, because that part will be overwritten after running grunt test.
karma.conf.js:
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
// as well as any additional frameworks (requirejs/chai/sinon/...)
frameworks: [
'jasmine'
],
// list of files / patterns to load in the browser
files: [
'app/scripts/persian.min.js',
// bower:js
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/angular-animate/angular-animate.js',
'bower_components/angular-aria/angular-aria.js',
'bower_components/angular-cookies/angular-cookies.js',
'bower_components/angular-messages/angular-messages.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-sanitize/angular-sanitize.js',
'bower_components/angular-touch/angular-touch.js',
'bower_components/angularLocalStorage/dist/angularLocalStorage.min.js',
'bower_components/ngmap/build/scripts/ng-map.js',
'bower_components/angular-loading-bar/build/loading-bar.js',
'bower_components/angular-persian/dist/angularpersian.js',
'bower_components/caman/dist/caman.min.js',
'bower_components/caman/dist/caman.full.min.js',
'bower_components/angular-xeditable/dist/js/xeditable.js',
'bower_components/moment/moment.js',
'bower_components/angular-mocks/angular-mocks.js',
// endbower
// AFTER END BOWER ADDING BOWER COMPONENTS NOT ADDED AUTOMATICLY:
'bower_components/adm-dtp/dist/ADM-dateTimePicker.min.js',
'app/scripts/**/*.js',
'test/mock/**/*.js',
'test/spec/**/*.js',
'app/scripts/controllers/bootstrapController.js'
],
// list of files / patterns to exclude
exclude: [
],
// web server port
port: 8082,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS',
],
// Which plugins to enable
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_DISABLE,
// Uncomment the following lines if you are using grunt's server to run the tests
proxies: {
'/': 'http://localhost:9000/'
},
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});

TopoJson Install Error?

I am trying to install topojson with node.js and I am getting a frustrating error. I reinstalled the latest version of node.js (4.4.5) and running the standard install method. It seems like everything installs correctly. Then I try to do something with topojson and it is clear that not everything is installed correctly--illegal operation on directory. So it seems like it is installed but that I am having permission problems perhaps? Can anyone help with this?
C:\>npm install -g topojson
C:\Users\Seth\AppData\Roaming\npm\topojson-geojson -> C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson-geojson
C:\Users\Seth\AppData\Roaming\npm\topojson -> C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson
C:\Users\Seth\AppData\Roaming\npm\topojson-merge -> C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson-merge
C:\Users\Seth\AppData\Roaming\npm\topojson-group -> C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson-group
C:\Users\Seth\AppData\Roaming\npm\topojson-svg -> C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson-svg
C:\Users\Seth\AppData\Roaming\npm
└─┬ topojson#1.6.26
├── d3#3.5.17
├─┬ d3-geo-projection#0.2.16
│ └─┬ brfs#1.4.3
│ ├─┬ quote-stream#1.0.2
│ │ ├── buffer-equal#0.0.1
│ │ └── minimist#1.2.0
│ ├── resolve#1.1.7
│ ├─┬ static-module#1.3.1
│ │ ├─┬ concat-stream#1.4.10
│ │ │ ├── inherits#2.0.1
│ │ │ ├─┬ readable-stream#1.1.14
│ │ │ │ └── isarray#0.0.1
│ │ │ └── typedarray#0.0.6
│ │ ├─┬ duplexer2#0.0.2
│ │ │ └─┬ readable-stream#1.1.14
│ │ │ └── isarray#0.0.1
│ │ ├─┬ escodegen#1.3.3
│ │ │ ├── esprima#1.1.1
│ │ │ ├── estraverse#1.5.1
│ │ │ ├── esutils#1.0.0
│ │ │ └─┬ source-map#0.1.43
│ │ │ └── amdefine#1.0.0
│ │ ├─┬ falafel#1.2.0
│ │ │ ├── acorn#1.2.2
│ │ │ ├── foreach#2.0.5
│ │ │ ├── isarray#0.0.1
│ │ │ └── object-keys#1.0.9
│ │ ├─┬ has#1.0.1
│ │ │ └── function-bind#1.1.0
│ │ ├── object-inspect#0.4.0
│ │ ├─┬ quote-stream#0.0.0
│ │ │ └── minimist#0.0.8
│ │ ├─┬ readable-stream#1.0.34
│ │ │ ├── core-util-is#1.0.2
│ │ │ ├── isarray#0.0.1
│ │ │ └── string_decoder#0.10.31
│ │ ├── shallow-copy#0.0.1
│ │ ├─┬ static-eval#0.2.4
│ │ │ └─┬ escodegen#0.0.28
│ │ │ ├── esprima#1.0.4
│ │ │ └── estraverse#1.3.2
│ │ └─┬ through2#0.4.2
│ │ └─┬ xtend#2.1.2
│ │ └── object-keys#0.4.0
│ └─┬ through2#2.0.1
│ ├─┬ readable-stream#2.0.6
│ │ ├── isarray#1.0.0
│ │ ├── process-nextick-args#1.0.7
│ │ └── util-deprecate#1.0.2
│ └── xtend#4.0.1
├── d3-queue#2.0.3
├─┬ optimist#0.3.7
│ └── wordwrap#0.0.3
├── rw#1.3.2
└─┬ shapefile#0.3.1
├── d3-queue#1.2.3
└── iconv-lite#0.2.11
C:\>topojson -v
C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson:259
if (error) throw error;
^
Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:603:19)
at module.exports (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\node_modules\rw\lib\rw\read-file-sync.js:14:28)
at Object.readFileSync (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\node_modules\rw\lib\rw\dash.js:7:19)
at inputJson (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson:245:30)
at start (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\node_modules\d3-queue\build\d3-queue.js:68:13)
at poke (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\node_modules\d3-queue\build\d3-queue.js:56:26)
at Queue.queue.defer (C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\node_modules\d3-queue\build\d3-queue.js:34:7)
at C:\Users\Seth\AppData\Roaming\npm\node_modules\topojson\bin\topojson:196:5
at Array.forEach (native)

Resources