Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Error in "npm install -g findit" #2089

Closed
elentok opened this Issue · 3 comments

4 participants

David Elentok Ori Avtalion Mikel Cármenes Cavia Luke Arduini
David Elentok

When running "npm install findit" (locally) it works fine,
but when running "sudo npm install -g findit" this happens:

npm http GET https://registry.npmjs.org/findit
npm http 304 https://registry.npmjs.org/findit

npm ERR! Error: UNKNOWN, unknown error '/usr/lib/node_modules'
npm ERR! 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! 
npm ERR! System Linux 3.0.0-14-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "findit"
npm ERR! cwd /home/david/projects/npm-stuff/test
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! path /usr/lib/node_modules
npm ERR! fstream_path /usr/lib/node_modules/___findit.npm
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code UNKNOWN
npm ERR! message UNKNOWN, unknown error '/usr/lib/node_modules'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:161:23)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/david/projects/npm-stuff/test/npm-debug.log
npm not ok

The contents of the "npm-debug.log" file:

info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'install', '-g', 'findit' ]
info using npm@1.1.0-2
info using node@v0.6.8
verbose /usr/bin/node node symlink
verbose config file /home/david/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/lib/nodejs/npm/npmrc
verbose cache add [ 'findit', null ]
silly cache add: name, spec, args [ undefined, 'findit', [ 'findit', null ] ]
verbose parsed url { pathname: 'findit', path: 'findit', href: 'findit' }
verbose addNamed [ 'findit', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'findit', '', false ]
verbose raw, before any munging findit
verbose url resolving [ 'https://registry.npmjs.org/', './findit' ]
verbose url resolved https://registry.npmjs.org/findit
verbose etag "T02A52HVO97IV90FEIGJRP14"
http GET https://registry.npmjs.org/findit
http 304 https://registry.npmjs.org/findit
silly get cb [ 304,
silly get cb   { server: 'CouchDB/1.1.0 (Erlang OTP/R14B04)',
silly get cb     etag: '"T02A52HVO97IV90FEIGJRP14"',
silly get cb     date: 'Tue, 24 Jan 2012 21:03:32 GMT',
silly get cb     'content-length': '0' } ]
verbose etag findit from cache
silly name, range, hasData 2 [ 'findit', '', true ]
silly versions [ 'findit',
silly versions   [ '0.0.1',
silly versions     '0.0.2',
silly versions     '0.0.3',
silly versions     '0.0.4',
silly versions     '0.0.5',
silly versions     '0.1.0',
silly versions     '0.1.1',
silly versions     '0.1.2' ] ]
verbose bin dist [ '0.6-ares1.7.5-DEV-evundefined-openssl1.0.0e-v83.6.6.19-linux-x64-3.0.0-14-generic',
verbose bin dist   { shasum: 'ac7fe600cd6a32a35672836b74cf6f1dde2e11f8',
verbose bin dist     tarball: 'http://registry.npmjs.org/findit/-/findit-0.1.2.tgz' } ]
verbose caching /home/david/.npm/findit/0.1.2/package/package.json
verbose loadDefaults findit@0.1.2
silly resolved [ { name: 'findit',
silly resolved     version: '0.1.2',
silly resolved     description: 'Walk a directory tree.',
silly resolved     main: './index.js',
silly resolved     dependencies: { seq: '>=0.1.7' },
silly resolved     devDependencies: { hashish: '>=0.0.2 <0.1', expresso: '0.7.x' },
silly resolved     scripts: { test: 'expresso' },
silly resolved     repository: 
silly resolved      { type: 'git',
silly resolved        url: 'git://github.com/substack/node-findit.git' },
silly resolved     keywords: [ 'find', 'walk', 'directory', 'recursive', 'tree' ],
silly resolved     author: 
silly resolved      { name: 'James Halliday',
silly resolved        email: 'mail@substack.net',
silly resolved        url: 'http://substack.net' },
silly resolved     license: 'MIT/X11',
silly resolved     engine: [ 'node >=0.2.0' ],
silly resolved     _id: 'findit@0.1.2',
silly resolved     optionalDependencies: {},
silly resolved     engines: { node: '*' },
silly resolved     _engineSupported: true,
silly resolved     _npmVersion: '1.1.0-2',
silly resolved     _nodeVersion: 'v0.6.8',
silly resolved     _defaultsLoaded: true } ]
info into /usr/lib findit@0.1.2
info installOne findit@0.1.2
info unbuild /usr/lib/node_modules/findit
verbose from cache /home/david/.npm/findit/0.1.2/package/package.json
verbose unpack_ uid, gid [ undefined, undefined ]
verbose unpackTarget /usr/lib/node_modules/findit
silly gunzTarPerm modes [ '755', '644' ]
ERR! Error: UNKNOWN, unknown error '/usr/lib/node_modules'
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 3.0.0-14-generic
ERR! command "node" "/usr/bin/npm" "install" "-g" "findit"
ERR! cwd /home/david/projects/npm-stuff/test
ERR! node -v v0.6.8
ERR! npm -v 1.1.0-2
ERR! path /usr/lib/node_modules
ERR! fstream_path /usr/lib/node_modules/___findit.npm
ERR! fstream_type Directory
ERR! fstream_class DirWriter
ERR! code UNKNOWN
ERR! message UNKNOWN, unknown error '/usr/lib/node_modules'
ERR! errno {}
ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:161:23)
verbose exit [ 1, true ]

I'm using Ubuntu 11.10 and I installed nodejs like this:

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs nodejs-dev npm
Ori Avtalion

Using the same version of node and npm, I'm seeing this error instead:

$ sudo npm install -g findit
npm http GET https://registry.npmjs.org/findit
npm http 304 https://registry.npmjs.org/findit

npm ERR! TypeError: Cannot call method 'call' of undefined
npm ERR!     at Object.lchown (/usr/lib/nodejs/npm/node_modules/graceful-fs/graceful-fs.js:228:17)
npm ERR!     at setProps (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:240:19)
npm ERR!     at Object.oncomplete (/usr/lib/nodejs/npm/node_modules/fstream/lib/writer.js:206:7)

$ cat npm-debug.log 
info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'install', '-g', 'findit' ]
info using npm@1.1.0-2
info using node@v0.6.8
verbose /usr/bin/node node symlink
verbose config file /home/ori/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/lib/nodejs/npm/npmrc
silly exec /usr/bin/node "/usr/lib/nodejs/npm/bin/npm-get-uid-gid.js" "nobody" 1000
silly spawning [ '/usr/bin/node',
silly spawning   [ '/usr/lib/nodejs/npm/bin/npm-get-uid-gid.js', 'nobody', 1000 ],
silly spawning   null ]
silly output from getuid/gid {"uid":65534,"gid":1000}
silly output from getuid/gid 
verbose cache add [ 'findit', null ]
silly cache add: name, spec, args [ undefined, 'findit', [ 'findit', null ] ]
verbose parsed url { pathname: 'findit', path: 'findit', href: 'findit' }
verbose addNamed [ 'findit', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'findit', '', false ]
verbose raw, before any munging findit
verbose url resolving [ 'https://registry.npmjs.org/', './findit' ]
verbose url resolved https://registry.npmjs.org/findit
verbose etag "T02A52HVO97IV90FEIGJRP14"
http GET https://registry.npmjs.org/findit
http 304 https://registry.npmjs.org/findit
silly get cb [ 304,
silly get cb   { server: 'CouchDB/1.1.0 (Erlang OTP/R14B04)',
silly get cb     etag: '"T02A52HVO97IV90FEIGJRP14"',
silly get cb     date: 'Tue, 24 Jan 2012 21:13:54 GMT',
silly get cb     'content-length': '0' } ]
verbose etag findit from cache
silly name, range, hasData 2 [ 'findit', '', true ]
silly versions [ 'findit',
silly versions   [ '0.0.1',
silly versions     '0.0.2',
silly versions     '0.0.3',
silly versions     '0.0.4',
silly versions     '0.0.5',
silly versions     '0.1.0',
silly versions     '0.1.1',
silly versions     '0.1.2' ] ]
verbose bin dist [ '0.6-ares1.7.5-DEV-evundefined-openssl1.0.0e-v83.6.6.19-linux-x64-3.0.0-14-generic',
verbose bin dist   { shasum: 'ac7fe600cd6a32a35672836b74cf6f1dde2e11f8',
verbose bin dist     tarball: 'http://registry.npmjs.org/findit/-/findit-0.1.2.tgz' } ]
verbose caching /home/ori/.npm/findit/0.1.2/package/package.json
verbose loadDefaults findit@0.1.2
silly resolved [ { name: 'findit',
silly resolved     version: '0.1.2',
silly resolved     description: 'Walk a directory tree.',
silly resolved     main: './index.js',
silly resolved     dependencies: { seq: '>=0.1.7' },
silly resolved     devDependencies: { hashish: '>=0.0.2 <0.1', expresso: '0.7.x' },
silly resolved     scripts: { test: 'expresso' },
silly resolved     repository: 
silly resolved      { type: 'git',
silly resolved        url: 'git://github.com/substack/node-findit.git' },
silly resolved     keywords: [ 'find', 'walk', 'directory', 'recursive', 'tree' ],
silly resolved     author: 
silly resolved      { name: 'James Halliday',
silly resolved        email: 'mail@substack.net',
silly resolved        url: 'http://substack.net' },
silly resolved     license: 'MIT/X11',
silly resolved     engine: [ 'node >=0.2.0' ],
silly resolved     _id: 'findit@0.1.2',
silly resolved     optionalDependencies: {},
silly resolved     engines: { node: '*' },
silly resolved     _engineSupported: true,
silly resolved     _npmVersion: '1.1.0-2',
silly resolved     _nodeVersion: 'v0.6.8',
silly resolved     _defaultsLoaded: true } ]
info into /usr/lib findit@0.1.2
info installOne findit@0.1.2
info unbuild /usr/lib/node_modules/findit
verbose from cache /home/ori/.npm/findit/0.1.2/package/package.json
verbose mkdir (expected) error ENOENT, no such file or directory '/usr/lib/node_modules'
verbose mkdir (expected) error ENOENT, no such file or directory '/usr/lib/node_modules/___findit.npm'
verbose mkdir done: /usr/lib/node_modules/___findit.npm 755
verbose unpack_ uid, gid [ 65534, 1000 ]
verbose unpackTarget /usr/lib/node_modules/findit
silly gunzTarPerm modes [ '755', '644' ]
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 3.0.0-14-generic
ERR! command "node" "/usr/bin/npm" "install" "-g" "findit"
ERR! cwd /tmp/node-lazy
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 ]
Mikel Cármenes Cavia

salty-horse, you appear to be having the same issue as me though this happens to me with a different package. Given that the error is different from elentok's, I've just opened a new issue here: #2090

Luke Arduini

This should be fixed as of 760ac77

Luke Arduini luk- closed this
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.