javascript - Node.js npm install express failed to fetch from registry -
this question has answer here:
i starting first node.js server. attempting follow tutorial in node.js.
having installed node.js , executed npm install
, next instruction start server running node server.js
generates following error:
node.js:201 throw e; // process.nexttick error, or 'error' event on first tick ^ error: cannot find module 'express' @ function._resolvefilename (module.js:332:11) @ function._load (module.js:279:25) @ module.require (module.js:354:17) @ require (module.js:370:17) @ object.<anonymous> (/home/sisko/desktop/exercisefiles/01/03/start/server.js:1:77) @ module._compile (module.js:441:26) @ object..js (module.js:459:10) @ module.load (module.js:348:32) @ function._load (module.js:308:12) @ array.0 (module.js:479:10) sisko@virtualbox:~/desktop/exercisefiles/01/03/start$
it seemed needed module called express looked around , found npm install express
command should fix issue. however, following error:
sisko@virtualbox:~/desktop/exercisefiles/01/03/start$ npm install express npm http https://registry.npmjs.org/express npm err! error: failed fetch registry: express npm err! @ /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12 npm err! @ cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9) npm err! @ request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18) npm err! @ request.callback (/usr/lib/nodejs/request/main.js:119:22) npm err! @ request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58) npm err! @ request.emit (events.js:88:20) npm err! @ clientrequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12) npm err! @ clientrequest.emit (events.js:67:17) npm err! @ httpparser.onincoming (http.js:1261:11) npm err! @ httpparser.onheaderscomplete (http.js:102:31) npm err! may report log at: npm err! <http://bugs.debian.org/npm> npm err! or use npm err! reportbug --attach /home/sisko/desktop/exercisefiles/01/03/start/npm-debug.log npm npm err! npm err! system linux 3.2.0-52-generic npm err! command "node" "/usr/bin/npm" "install" "express" npm err! cwd /home/sisko/desktop/exercisefiles/01/03/start npm err! node -v v0.6.12 npm err! npm -v 1.1.4 npm err! message failed fetch registry: express npm err! npm err! additional logging details can found in: npm err! /home/sisko/desktop/exercisefiles/01/03/start/npm-debug.log npm not ok
for people running npm config set registry http://registry.npmjs.org/
before npm install express
seems fix issue
Comments
Post a Comment