Domanda

i want to install hapi module of node i am using the following command

npm install hapi

and i am getting the following error

npm http GET https://registry.npmjs.org/hapi

npm ERR! Error: failed to fetch from registry: hapi
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-     client/request.js:136:18)

npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1137:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /home/mohit/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.2.0-23-generic
npm ERR! command "node" "/usr/bin/npm" "install" "hapi"
npm ERR! cwd /home/mohit
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: hapi
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/mohit/npm-debug.log
npm not ok

i am able to install other modules like request & express but getting error in installing hapi ,how to resolve the error

È stato utile?

Soluzione

Try upgrading node.js. You're using v0.6.x which is really old and uses an old version of npm. The current latest stable version of node (as of this writing) is v0.10.26 (which comes with npm 1.4.3).

EDIT: I can confirm that npm install hapi works with node v0.10.26.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top