Here is the output on the console:
floydpink@MBP mean-app (master) $ npm install
npm ERR! Darwin 13.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.32
npm ERR! npm v2.0.0
npm ERR! code MODULE_NOT_FOUND
npm ERR! Cannot find module 'glob'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/floydpink/Source/swara-server/mean-app/npm-debug.log
floydpink@MBP mean-app (master) $
And the npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install' ]
2 info using npm@2.0.0
3 info using node@v0.10.32
4 verbose node symlink /usr/local/bin/node
5 verbose stack Error: Cannot find module 'glob'
5 verbose stack at Function.Module._resolveFilename (module.js:338:15)
5 verbose stack at Function.Module._load (module.js:280:25)
5 verbose stack at Module.require (module.js:364:17)
5 verbose stack at require (module.js:380:17)
5 verbose stack at Object.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/completion/file-completion.js:5:12)
5 verbose stack at Module._compile (module.js:456:26)
5 verbose stack at Object.Module._extensions..js (module.js:474:10)
5 verbose stack at Module.load (module.js:356:32)
5 verbose stack at Function.Module._load (module.js:312:12)
5 verbose stack at Module.require (module.js:364:17)
6 verbose cwd /Users/floydpink/Source/swara-server/mean-app
7 error Darwin 13.4.0
8 error argv "node" "/usr/local/bin/npm" "install"
9 error node v0.10.32
10 error npm v2.0.0
11 error code MODULE_NOT_FOUND
12 error Cannot find module 'glob'
13 error If you need help, you may report this error at:
13 error <http://github.com/npm/npm/issues>
14 verbose exit [ 1, true ]
I upgraded to this version of nodejs and npm a few days back and things have been fine until yesterday.
Could someone point me to the right direction in fixing this?
I faced the exact issue. But I did not have brew on my Ubuntu Amazon EC2 instance(and I did not want to install it). I uninstalled npm using sudo npm uninstall npm –g
and then ran the make install
command again in the NPM directory to recompile npm and that fixed the issue.