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

Already on GitHub? Sign in to your account

npm -g update (no worky!) #2717

Closed
uipoet opened this Issue Aug 14, 2012 · 12 comments

Comments

Projects
None yet

uipoet commented Aug 14, 2012

After updating the global npm there is a catastrophic break. I've removed npm and all node_modules, installed from scratch and all works again until I reran the global update.

npm -g update
npm -g ls
npm ERR! TypeError: Object #<error> has no method 'hasOwnProperty'
npm ERR!     at loadPrefix (/usr/local/lib/node_modules/npm/lib/npm.js:355:13)
npm ERR!     at Array.0 (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR!     at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR!     at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/npm.js:343:7
npm ERR!     at cb (/usr/local/lib/node_modules/npm/lib/utils/ini.js:82:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:124:9
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:203:20
npm ERR!     at fs.js:117:20
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5

No worky indeed!

Boy, this is annoying. My entire Node ecosystem is unusable right now. What the heck can I do about this??

npm ERR! System Linux 2.6.35-32-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "update" "npm" "-g"
npm ERR! cwd /home/tim
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! type undefined_method

Same problem. Everything I do now after sudo npm update -g ends with a:
TypeError: Object # has no method 'hasOwnProperty'

ikr commented Aug 14, 2012

Same here

OS X 10.6.8, homebrew

kevwil commented Aug 14, 2012

ditto

Same on OS X.7.4:

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/opt/homebrew/bin/npm" "update" "-g"
npm ERR! cwd /Users/orangeraven
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! type undefined_method
@ghost

ghost commented Aug 14, 2012

Same problem here.

patrick@beast:~ 1.9.3-p194
 $ npm update -g
npm ERR! TypeError: Object #<error> has no method 'hasOwnProperty'
npm ERR!     at loadPrefix (/usr/local/lib/node_modules/npm/lib/npm.js:355:13)
npm ERR!     at Array.0 (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR!     at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR!     at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/npm.js:343:7
npm ERR!     at cb (/usr/local/lib/node_modules/npm/lib/utils/ini.js:82:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:124:9
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:203:20
npm ERR!     at fs.js:117:20
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g"
npm ERR! cwd /Users/patrick
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! type undefined_method
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/patrick/npm-debug.log
npm ERR! not ok code 0

Zearin commented Aug 14, 2012

+1. Me too. ☹

Running on OS X 10.8, Homebrew, Node 0.8.6.

Here’s the output:

$ npm -g ls --depth=0
npm ERR! TypeError: Object #<error> has no method 'hasOwnProperty'
npm ERR!     at loadPrefix (/usr/local/lib/node_modules/npm/lib/npm.js:355:13)
npm ERR!     at Array.0 (/usr/local/lib/node_modules/npm/node_modules/slide/lib/bind-actor.js:15:8)
npm ERR!     at LOOP (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:15:14)
npm ERR!     at chain (/usr/local/lib/node_modules/npm/node_modules/slide/lib/chain.js:20:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/npm.js:343:7
npm ERR!     at cb (/usr/local/lib/node_modules/npm/lib/utils/ini.js:82:5)
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:124:9
npm ERR!     at /usr/local/lib/node_modules/npm/lib/utils/ini.js:203:20
npm ERR!     at fs.js:117:20
npm ERR!     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:53:5
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Darwin 12.0.0
npm ERR! command "node" "/usr/local/bin/npm" "-g" "ls" "--depth=0"
npm ERR! cwd /Users/amrogers
npm ERR! node -v v0.8.6
npm ERR! npm -v 1.1.48
npm ERR! type undefined_method
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/amrogers/npm-debug.log
npm ERR! not ok code 0
Contributor

lxe commented Aug 14, 2012

Same here. OSX 10.7.4. I downloaded the node 0.8.6 OSX package from the site.

And I. OSX 10.7.4, node v0.8.6, npm 1.1.48

same problem for me at ubuntu 12.04 , nodev0.8.6 and npm 1.1.48

@isaacs isaacs closed this in 4184226 Aug 15, 2012

Owner

isaacs commented Aug 15, 2012

Ugh, I hate the update command so much sometimes.

It'll be fixed in the next release. Thanks for the helpful reproduction steps, everyone.

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