Installing pkg with many dependencies as root fails with graceful-fs 1.1.4 #2080

Closed
afbobak opened this Issue Jan 23, 2012 · 0 comments

Comments

Projects
None yet
2 participants

afbobak commented Jan 23, 2012

Upgrading to graceful-fs 1.1.4 breaks installing packages as root on Linux:

verbose from cache /root/.npm/colors/0.6.0-1/package/package.json
verbose chmod /root/.npm/colors/0.6.0-1/package.tgz 644
verbose chown [ '/root/.npm/colors/0.6.0-1/package.tgz', 0, 0 ]
ERR! TypeError: Cannot call method 'call' of undefined
ERR! at Object.lchown (/usr/lib/nodejs/npm/node_modules/graceful-fs/graceful-fs.js:228:17)
ERR! at setProps (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:240:19)
ERR! at Object.oncomplete (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:206:7)
ERR! You may report this log at:
ERR! http://github.com/isaacs/npm/issues
ERR! or email it to:
ERR! npm-@googlegroups.com
ERR!
ERR! System Linux 2.6.32-37-generic-pae
ERR! command "node" "/usr/bin/npm" "install" "--unsafe-perm" "-g" "osares.app"
ERR! cwd /osares/scripts
ERR! node -v v0.6.8
ERR! npm -v 1.1.0-2
ERR! type non_object_property_call
ERR! arguments [ 'call', undefined ]
ERR! message Cannot call method 'call' of undefined
verbose exit [ 1, true ]

Commenting out lines 218 to EOF in graceful-fs.js fixes the issue with root (but obviously introduces isaacs/node-graceful-fs#4 again)

isaacs added a commit to isaacs/node-graceful-fs that referenced this issue Jan 23, 2012

@isaacs isaacs closed this in 760ac77 Jan 23, 2012

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