Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm 3.5.4: EBUNDLEOVERRIDE during update causes npmlog error

Tags:

node.js

npm

Upgraded to Node 5.4.0 via 'brew upgrade,' and then ran 'npm update -g,' which upgraded to npm 3.5.4. npm update finished with warnings:

/usr/local/lib
ā””ā”€ā”€ [email protected]

npm WARN EBUNDLEOVERRIDE Replacing bundled npm > init-package-json with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > node-gyp with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > npm-install-checks with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > npmlog with new installed version
npm WARN EBUNDLEOVERRIDE Replacing bundled npm > read-package-json with new installed version

Running 'npm update -g' (or any other npm command) now throws npmlog errors:

module.js:328
    throw err;
    ^

Error: Cannot find module 'npmlog'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:20:13
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-cli.js:76:3)
    at Module._compile (module.js:398:26)
    at Object.Module._extensions..js (module.js:405:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)

It's not clear to me why the override is happening, or how to point npm to the logs again. Appreciate any thoughts.

like image 290
Dusty Pomerleau Avatar asked Jan 10 '16 03:01

Dusty Pomerleau


1 Answers

Looks like brew reinstall node is the least-destructive way to resolve this. Will install node 3.3.12 while leaving everything else in place:

$ brew reinstall node
==> Reinstalling node
==> Downloading https://homebrew.bintray.com/bottles/node-5.4.1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/node-5.4.1.yosemite.bottle.tar.gz
==> Pouring node-5.4.1.yosemite.bottle.tar.gz
==> Caveats
Please note by default only English locale support is provided. If you need
full locale support you should:
  `brew reinstall node --with-full-icu`

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
šŸŗ  /usr/local/Cellar/node/5.4.1: 2,827 files, 34.2M

$ npm outdated --global
Package  Current  Wanted  Latest  Location
npm       3.3.12   3.5.4   3.5.3
like image 165
Chris Avatar answered Dec 07 '22 00:12

Chris