isaacs/npm — Issue #2064: install connect: TypeError: Cannot read property 'code' of null
Author: randymized
Created: 2012-01-19 17:20:48+00:00
State: open

Cannot install connect. I originally apt-get installed node on Ubuntu Oneiric, but found it too out of date. Uninstalled and backed out as best I could and then cloned node from github and config/make/make install from there. Now trying to reload npm packages, but I cannot even install connect.

$ npm install connect npm http GET https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/connect

npm ERR! TypeError: Cannot read property 'code' of null
npm ERR! at chownErOk (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:253:13)
npm ERR! at Object.oncomplete (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:229:11)
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 3.0.0-12-generic
npm ERR! command "node" "/usr/bin/npm" "install" "connect"
npm ERR! cwd /media/sf_project/malifi
npm ERR! node -v v0.7.0-pre
npm ERR! npm -v 1.1.0-2
npm ERR! type non_object_property_load
npm ERR! arguments [ 'code', null ]
npm ERR! message Cannot read property 'code' of null
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /media/sf_project/malifi/npm-debug.log
npm not ok
randymized@randy-natty:~/malifi$ npm install connect
npm http GET https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/connect

npm ERR! TypeError: Cannot read property 'code' of null
npm ERR! at chownErOk (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:253:13)
npm ERR! at Object.oncomplete (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:229:11)
npm ERR! You may report this log at:
npm ERR!
npm ERR! or email it to:
npm ERR!
npm ERR!
npm ERR! System Linux 3.0.0-12-generic
npm ERR! command "node" "/usr/bin/npm" "install" "connect"
npm ERR! cwd /media/sf_project/malifi
npm ERR! node -v v0.7.0-pre
npm ERR! npm -v 1.1.0-2
npm ERR! type non_object_property_load
npm ERR! arguments [ 'code', null ]
npm ERR! message Cannot read property 'code' of null
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /media/sf_project/malifi/npm-debug.log

# Contents of /media/sf_project/malifi/npm-debug.log:
info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'install', 'connect' ]
info using npm@1.1.0-2
info using node@v0.7.0-pre
verbose config file /home/randymized/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/lib/node_modules/npm/npmrc
verbose mkdir done: /media/sf_project/malifi 755
verbose cache add [ 'connect', null ]
silly cache add: name, spec, args [ undefined, 'connect', [ 'connect', null ] ]
verbose parsed url { pathname: 'connect', path: 'connect', href: 'connect' }
verbose addNamed [ 'connect', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'connect', '', false ]
verbose raw, before any munging connect
verbose url resolving [ 'https://registry.npmjs.org/', './connect' ]
verbose url resolved https://registry.npmjs.org/connect
verbose etag "9X8QGROIFM9YZ25BLK099J0ZN"
http GET https://registry.npmjs.org/connect
http 304 https://registry.npmjs.org/connect
silly get cb [ 304,
silly get cb { server: 'CouchDB/1.1.0 (Erlang OTP/R14B04)',
silly get cb etag: '"9X8QGROIFM9YZ25BLK099J0ZN"',
silly get cb date: 'Thu, 19 Jan 2012 17:08:49 GMT',
silly get cb 'content-length': '0' } ]
verbose etag connect from cache
ERR! TypeError: Cannot read property 'code' of null
ERR! at chownErOk (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:253:13)
ERR! at Object.oncomplete (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:229:11)
ERR! You may report this log at:
ERR!
ERR! or email it to:
ERR!
ERR!
ERR! System Linux 3.0.0-12-generic
ERR! command "node" "/usr/bin/npm" "install" "connect"
ERR! cwd /media/sf_project/malifi
ERR! node -v v0.7.0-pre
ERR! npm -v 1.1.0-2
ERR! type non_object_property_load
ERR! arguments [ 'code', null ]
ERR! message Cannot read property 'code' of null
verbose exit [ 1, true ]