Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

0.10.14, Darwin, npm update uid issue #5904

Closed
bazineta opened this issue Jul 25, 2013 · 4 comments
Closed

0.10.14, Darwin, npm update uid issue #5904

bazineta opened this issue Jul 25, 2013 · 4 comments
Labels

Comments

@bazineta
Copy link

After installation of 0.10.14 on a Mac running OS X 10.8.4, 'npm update -g' yields numerous errors like the following, and renders npm non-functional thereafter.

npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g"
npm ERR! cwd /Users/alb/Development
npm ERR! node -v v0.10.14
npm ERR! npm -v 1.3.5
npm ERR! TypeError: uid must be an unsigned int
npm ERR! at Object.fs.chown (fs.js:853:11)
npm ERR! at Object.chown (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:131:17)
npm ERR! at endChown (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:212:12)
npm ERR! at setProps (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:295:5)
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:286:7
npm ERR! at Object.oncomplete (fs.js:107:15)
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

@bnoordhuis
Copy link
Member

That's caused by ed80638. Apparently npm is feeding fs.chown() or fs.fchown() an UID < 0.

@bazineta
Copy link
Author

Is there a solution other than rolling back to .13?

@isaacs
Copy link

isaacs commented Jul 25, 2013

You can wait and roll forward to .15 :)

bnoordhuis added a commit that referenced this issue Jul 25, 2013
And process.getgid() too.

Commit ed80638 changed fs.chown() and fs.fchown() to only accept
unsigned integers. Make process.getuid() and process.getgid() follow
suit.

This commit should unbreak npm on OS X - it's hitting the new 'uid must
be an unsigned int' check when installing as e.g. user 'nobody' (which
has an UID of -2 in /etc/passwd or 4294967294 when cast to an uid_t.)

Fixes #5904.
@isaacs
Copy link

isaacs commented Jul 26, 2013

Fixed by 015ec05, aka v0.10.15

@isaacs isaacs closed this as completed Jul 26, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants