1

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 [email protected]
3 info using [email protected]
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?

2
  • 1
    Did you try reverting back to the version of npm that comes with node v0.10.32 (npm v1.4.28)? Commented Sep 23, 2014 at 1:29
  • 1
    Thanks... As suggested by @othiym23 on the issue I raised at npm repo, I ran brew update ; brew upgrade ; brew uninstall node ; brew install node and that fixed it. Commented Sep 23, 2014 at 1:59

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

1 Comment

The oiginal question was for Mac OS X and not Ubuntu Linux
0

In my case, my Node.js was installed by the .pkg file(On a macOS). And tried reinstall npm but failed.

I solved this problem by uninstall the node totally follow this gist: https://gist.github.com/TonyMtz/d75101d9bdf764c890ef

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.