npm install error

I have no idea why the install of npm is failing. There is nothing online about this error so here it is.

“AgentSSL.prototype.addRequest” -> “TypeError: Cannot read property ‘prototype’ of undefined”.

I’ve tried to install npm using the following with no luck (as suggested).

curl https://npmjs.org/install.sh | sh
curl https://npmjs.org/install.sh | sudo sh
git clone git://github.com/isaacs/npm.git
cd npm
make install # or `make link` for bleeding edge

Image

sam at testing in ~/node-install/node-v0.10.23
$ curl https://npmjs.org/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7810  100  7810    0     0   8482      0 --:--:-- --:--:-- --:--:-- 65630
tar=/bin/tar
version:
tar (GNU tar) 1.26
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
install npm@latest
fetching: http://registry.npmjs.org/npm/-/npm-1.3.17.tgz
0.10.23
1.3.17
cleanup prefix=/usr/local

All clean!

/tmp/npm.28380/package/node_modules/request/node_modules/forever-agent/index.js:97
ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
                                                      ^
TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/tmp/npm.28380/package/node_modules/request/node_modules/forever-agent/index.js:97:55)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/tmp/npm.28380/package/node_modules/request/request.js:21:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

/tmp/npm.28380/package/node_modules/request/node_modules/forever-agent/index.js:97
ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
                                                      ^
TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/tmp/npm.28380/package/node_modules/request/node_modules/forever-agent/index.js:97:55)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/tmp/npm.28380/package/node_modules/request/request.js:21:20)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
It failed

Image

I’m using stable node version 0.10.23.

I used 0.10.1 and still got the same erorr.

Image

Anyone any ideas?

Note: This post is a bit old now so the install of node.js continues to improve see the latest install notes.