Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

afbobak opened this Issue · 0 comments

2 participants


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! or email it to:
ERR! System Linux 2.6.32-37-generic-pae
ERR! command "node" "/usr/bin/npm" "install" "--unsafe-perm" "-g" ""
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 isaacs referenced this issue from a commit in isaacs/node-graceful-fs
@isaacs isaacs Fix npm/npm#2080 Don't wrap undefined chown methods 019400b
@isaacs isaacs closed this in 760ac77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.