New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'npmlog' following homebrew update & upgrade #23

Closed
evanyklim opened this Issue Oct 21, 2015 · 5 comments

Comments

Projects
None yet
4 participants
@evanyklim

evanyklim commented Oct 21, 2015

Details: OSX 10.10.5, Node 4.2.1

Hi, I ran brew update && brew upgrade and now when I try to use npm in the command line I get the following (below). Any help would be appreciated as I'm at a loss as to what to do apart from reinstalling node and npm. Thanks

module.js:339
throw err;
^

Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:18:11
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)

@evanyklim

This comment has been minimized.

evanyklim commented Oct 22, 2015

Issue fixed, I ran 'brew uninstall node' then 'brew install node'. Apologies for taking up space.

@evanyklim evanyklim closed this Oct 22, 2015

@gochev

This comment has been minimized.

gochev commented Jun 29, 2016

Nothing helps .. keep getting

Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:13
at Object. (/usr/local/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)

With 6.2.2

@gochev

This comment has been minimized.

gochev commented Jun 29, 2016

ok it turns out I had to do:
brew uninstall node
sudo rm -rf /usr/local/lib/node_modules
brew install node

@liyali

This comment has been minimized.

liyali commented Jan 28, 2017

Thanks @gochev. Note that you'll also likely need to delete your local meteor packages if the error persists.
rm -rf ~/.meteor

@talentedaamer

This comment has been minimized.

talentedaamer commented Sep 21, 2017

Thanks, @gochev I also forced the link and overwrite all conflicting files using brew link --overwrite node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment