my npm is not working at all. Not only when I'm trying to install using a package.json file, but also when I'm just trying to install a node module. Here is what comes up in the terminal:
npm http GET https://registry.npmjs.org/express/3.3.3
npm http GET https://registry.npmjs.org/express-hbs
npm http GET https://registry.npmjs.org/ember
npm http GET https://registry.npmjs.org/mongojs
npm http GET https://registry.npmjs.org/everyauth
npm http GET https://registry.npmjs.org/path
npm http GET https://registry.npmjs.org/charlotte
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io-client
npm ERR! Error: failed to fetch from registry: mongojs
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/christian/nave/myspendingNode/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /home/christian/nave/myspendingNode
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: mongojs
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/christian/nave/myspendingNode/npm-debug.log
npm not ok
Can anyone point me in the direction to fix this?
npm config set registry http://registry.npmjs.org/
This basically changes the url to http instead of the default https
Related
I want to install less module on Centos 6.6 by npm, but I come across some problems.
executed command:
[dinghao#localhost ~]$ sudo npm install -g less
error log:
npm http GET https://registry.npm.taobao.org/less
npm http GET https://registry.npm.taobao.org/less
npm http GET https://registry.npm.taobao.org/less
npm ERR! Error: failed to fetch from registry: less
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/get.js:140:18)
npm ERR! at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:32:9)
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:122:10)
npm ERR! at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:132:9)
npm ERR! at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:225:20)
npm ERR! at Request._callback (/usr/lib/node_modules/npm-registry-client/lib/request.js:204:20)
npm ERR! at self.callback (/usr/lib/node_modules/request/index.js:148:22)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at ClientRequest.self.clientErrorHandler (/usr/lib/node_modules/request/index.js:257:10)
npm ERR! at ClientRequest.emit (events.js:95:17)
npm ERR! If you need help, 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! System Linux 2.6.32-504.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "less"
npm ERR! cwd /home/dinghao
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/dinghao/npm-debug.log
npm ERR! not ok code 0
How to resolve this?
I read many posts here teaching how to update nodejs by using npm. I followed all the proposed steps by I keep getting the same error:
administrator#Ubuntu-CPDiX-Test-Machine:~$ npm install -g npm
npm http GET https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/administrator/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm"
npm ERR! cwd /home/administrator
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: npm
npm ERR! Error: EACCES, permission denied 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 3.13.0-32-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "npm"
npm ERR! cwd /home/administrator
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, permission denied 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/administrator/npm-debug.log
npm not ok
I get this error when I work in a virtual machine: a VMWare Ubuntu 12.04.5. Would you have any suggestions?
Thanks in advance!
Read the error:
Please try running this command again as root/Administrator
Try:
sudo npm install -g npm
And as #mscdex said, you have to upgrade you node version. it is really old.
I'm trying to install node-red on ubuntu 14.04 lts.
I've installed nodejs and nvm, then i've launched:
git clone https://github.com/node-red/node-red.git
cd node-red
sudo npm install --production
I got this error:
....
npm http GET https://registry.npmjs.org/uglify-js/2.4.13
npm ERR! Error: failed to fetch from registry: express
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
I've tried to use:
npm config set registry http://registry.npmjs.org/
sudo npm install --production
And now i got:
....
npm http 304 http://registry.npmjs.org/mqtt
npm ERR! Error: No compatible version found: mqtt#'>=0.3.0- <0.4.0-'
npm ERR! Valid install targets:
npm ERR! ["0.1.8","0.2.0","0.2.1","0.2.2","0.2.3","0.2.4","0.2.5"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:488:10)
npm ERR! at next_ (/usr/share/npm/lib/cache.js:438:17)
npm ERR! at next (/usr/share/npm/lib/cache.js:415:44)
npm ERR! at /usr/share/npm/lib/cache.js:408:5
npm ERR! at saved (/usr/share/npm/lib/utils/npm-registry-client/get.js:147:7)
npm ERR! at Object.oncomplete (/usr/lib/nodejs/graceful-fs.js:230:7)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
How can i solve?
I'm trying to install a project from GitHub and followed the installation instructions. When I run npm install in the project directory it's returning the error results below:
root#server:/var/www/nomp# npm install
npm WARN colors#0.6.2 package.json: bugs['name'] should probably be bugs['url']
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/bignum
npm ERR! Error: failed to fetch from registry: request
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /var/www/nomp/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/nomp
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: request
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/nomp/npm-debug.log
npm not ok
Does anybody know the issue? I just installed nodejs and npm so I have no idea why this would happen.
Edit (ran after setting registry):
npm WARN colors#0.6.2 package.json: bugs['name'] should probably be bugs['url']
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/bignum
npm ERR! Error: failed to fetch from registry: request
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /var/www/nomp/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/nomp
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: request
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/nomp/npm-debug.log
npm not ok
root#pool:/var/www/nomp# vi npm-debug.log
root#pool:/var/www/nomp# vi npm-debug.log
root#pool:/var/www/nomp# npm install
npm WARN colors#0.6.2 package.json: bugs['name'] should probably be bugs['url']
npm http GET https://registry.npmjs.org/body-parser
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/bignum
npm ERR! Error: failed to fetch from registry: request
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /var/www/nomp/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/nomp
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: request
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/nomp/npm-debug.log
npm not ok
root#pool:/var/www/nomp# vi npm-debug.log
root#pool:/var/www/nomp# vi npm-debug.log
root#pool:/var/www/nomp# npm config set registry http://registry.npmjs.org/
root#pool:/var/www/nomp# npm install
npm WARN colors#0.6.2 package.json: bugs['name'] should probably be bugs['url']
npm http GET http://registry.npmjs.org/body-parser
npm http GET http://registry.npmjs.org/request
npm http GET http://registry.npmjs.org/bignum
npm http 200 http://registry.npmjs.org/request
npm http GET http://registry.npmjs.org/request/-/request-2.34.0.tgz
npm http 200 http://registry.npmjs.org/request/-/request-2.34.0.tgz
npm http 200 http://registry.npmjs.org/body-parser
npm http GET http://registry.npmjs.org/body-parser/-/body-parser-1.0.2.tgz
npm http 200 http://registry.npmjs.org/bignum
npm http GET http://registry.npmjs.org/bignum/-/bignum-0.6.2.tgz
npm http 200 http://registry.npmjs.org/body-parser/-/body-parser-1.0.2.tgz
npm http 200 http://registry.npmjs.org/bignum/-/bignum-0.6.2.tgz
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: request#2.34.0
npm ERR! Required: ["node >= 0.8.0"]
npm ERR! Actual: {"npm":"1.1.4","node":"0.6.12"}
npm ERR!
npm ERR! System Linux 3.8.0-29-generic
npm ERR! command "node" "/usr/bin/npm" "install"
npm ERR! cwd /var/www/nomp
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ENOTSUP
npm ERR! message Unsupported
npm ERR! errno {}
npm http GET http://registry.npmjs.org/type-is
npm http GET http://registry.npmjs.org/raw-body
npm http GET http://registry.npmjs.org/qs
> bignum#0.6.2 install /var/www/nomp/node_modules/bignum
> node-gyp configure build
sh: 1: node-gyp: not found
npm ERR! error installing bignum#0.6.2
npm http 200 http://registry.npmjs.org/qs
npm http 200 http://registry.npmjs.org/raw-body
npm ERR! error installing body-parser#1.0.2
npm http GET http://registry.npmjs.org/qs/-/qs-0.6.6.tgz
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/nomp/npm-debug.log
npm not ok
I also hit into this error. It might be due to my network.
I work out as:
npm --strict-ssl false install <pkg>
This option sets validation on nodejs's CA as optional. I think it has the same effect as Sandile's answer.
I think an issue just like this one has already been answered to some degree here: NPM installation error.
But, to save you some time, try npm config set registry http://registry.npmjs.org/
I was having the same kind of problem with the same version of node and npm.
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
These are the versions that you get with ubuntu using apt-get.
To fix the problem, I removed the old versions:
sudo apt-get remove nodejs
This removes node and npm.
Then installed the latest:
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=/usr/local
make
sudo make install
sudo chmod -R a+rx /usr/local/lib/node_modules
You can remove the install directory when you're done with it.
I got the script that I based this on from:
https://gist.github.com/isaacs/579814 which is linked to from: http://www.joyent.com/blog/installing-node-and-npm/
The article is a little out of date. For instance, npm comes with node now.
I new node.js developer. I trying simple chat project. So I want install socket.io with NPM but I get this error.
I use ubuntu 12.04
ubuntu#Ubuntu-1210:~/Masaüstü/blog$ npm install socket.io
npm http GET https://registry.npmjs.org/socket.io
npm ERR! Error: failed to fetch from registry: socket.io
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:412:12)
npm ERR! at ClientRequest.emit (events.js:67:17)
npm ERR! at HTTPParser.onIncoming (http.js:1261:11)
npm ERR! at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/ubuntu/Masaüstü/blog/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-35-generic
npm ERR! command "node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /home/ubuntu/Masaüstü/blog
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: socket.io
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/Masaüstü/blog/npm-debug.log
npm not ok
Sorry bad english. Thank you.
Like the answer in the link I posted in the comment above, I'd suggest first running
npm config set registry https://registry.npmjs.org/
Recomend use sudo.
sudo npm install socket.io