nvm: Error: Cannot find module 'npmlog'

Hello!

Thank you for this great tool.

However, I’m getting the following error:

$ npm up
module.js:341
    throw err;
    ^

Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at /home/sfomin/.nvm/versions/node/v5.5.0/lib/node_modules/npm/bin/npm-cli.js:20:13
    at Object.<anonymous> (/home/sfomin/.nvm/versions/node/v5.5.0/lib/node_modules/npm/bin/npm-cli.js:76:3)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)

Steps to reproduce:

#1. Install NVM
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash

#2. Restart the shell
exit

#3. Install latest Node version
nvm install 5.5.0

#4. Make it default
nvm alias default 5.5.0

#5. Update global modules
npm up -g

#6. Install project dependencies
cd ~/project && npm up

What could be the reason for this? Thank you!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@fergusmeiklejohn ah - this is an issue with your system node install. npm ls -g --depth=0 is probably failing?

Try uninstalling/reinstalling your system node.