AM getting this error if i use
sudo npm install -g n
I used the above to install socket but facing the below errors
npm http GET https://registry.npmjs.org/socket.io
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR! at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:525:26)
npm ERR! at ClientRequest.g (events.js:192:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1462:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1367:20)
npm ERR! at CleartextStream.CryptoStream._push (tls.js:526:27)
npm ERR! at SecurePair.cycle (tls.js:880:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:267:13)
npm ERR! at Socket.ondata (stream.js:38:26)
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 4.18.0-15-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "socket.io"
npm ERR! cwd /home/afreed
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ESSL
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/afreed/npm-debug.log
npm ERR! not ok code 0
afreed#JARVIS:~$ sudo npm install -g n
npm http GET https://registry.npmjs.org/n
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR! at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:525:26)
npm ERR! at ClientRequest.g (events.js:192:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1462:7)
npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23)
npm ERR! at CleartextStream.socketOnData [as ondata] (http.js:1367:20)
npm ERR! at CleartextStream.CryptoStream._push (tls.js:526:27)
npm ERR! at SecurePair.cycle (tls.js:880:20)
npm ERR! at EncryptedStream.CryptoStream.write (tls.js:267:13)
npm ERR! at Socket.ondata (stream.js:38:26)
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 4.18.0-15-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "n"
npm ERR! cwd /home/afreed
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ESSL
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/afreed/npm-debug.log
npm ERR! not ok code 0
try this :
npm config set registry="http://registry.npmjs.org/"
or clear cache of your npm:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
or simply you can turn off ssl_cert (not recommended):
npm config set strict-ssl false
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 am trying to install bower but this gives me below error , which i am not able to decipher why , can someone share their experience or reason for the same
`home#home:/usr/local/share$ which npm
/usr/bin/npm
home#home:/usr/local/share$ which node
/usr/bin/node
home#home:/usr/local/share$ pwd
/usr/local/share
home#home:/usr/local/share$ cd npm
bash: cd: npm: No such file or directory
home#home:/usr/local/share$ sudo npm install -g bower
npm http GET https://registry.npmjs.org/bower
npm ERR! Error: failed to fetch from registry: bower
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 /usr/local/share/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-96-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! cwd /usr/local/share
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: bower
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/share/npm-debug.log
npm not ok
I have set http and https proxy, I am behind a corporate firewall, I am trying to install protractor and I am running into the below error, please help in solving this.
C:\nodejs>npm install protractor
npm ERR! Error: 7156:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown
protocol:openssl\ssl\s23_clnt.c:795:
npm ERR!
npm ERR! at SlabBuffer.use (tls.js:235:18)
npm ERR! at CleartextStream.read [as _read] (tls.js:455:29)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:341:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:369:25)
npm ERR! at doWrite (_stream_writable.js:226:10)
npm ERR! at writeOrBuffer (_stream_writable.js:216:5)
npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:183:11)
npm ERR! at write (_stream_readable.js:602:24)
npm ERR! at flow (_stream_readable.js:611:7)
npm ERR! at Socket.pipeOnReadable (_stream_readable.js:643:5)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\n
pm-cli.js" "install" "protractor"
npm ERR! cwd C:\nodejs
npm ERR! node -v v0.10.34
npm ERR! npm -v 1.4.28
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\nodejs\npm-debug.log
npm ERR! not ok code 0
C:\nodejs>
I am getting following error when running npm install -g node-gyp command on Ubuntu and Windows 7
ERROR:
` sudo npm install -g node-gyp
npm http GET https://registry.npmjs.org/node-gyp
npm ERR! Error: failed to fetch from registry: node-gyp
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/gurbani/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-23-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "node-gyp"
npm ERR! cwd /home/gurbani
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: node-gyp
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/gurbani/npm-debug.log
npm not ok`
Please help in resolving this issue.
Thanks in advance.
Try sudo apt-get install gcc
then update all packages
I am trying to install node module redis v0.9.0 locally via npm. I have downloaded the tgz file from https://registry.npmjs.org/redis/-/redis-0.9.0.tgz. Now, when i try to execute the command npm install redis-0.9.0.tgz, it is trying to download again from the repository instead of just unpacking and installing. I am trying the command on linux environment. I am not getting why it tries to download.
npm http GET https://registry.npmjs.org/redis-0.9.0.tgz
npm http GET https://registry.npmjs.org/redis-0.9.0.tgz
npm http GET https://registry.npmjs.org/redis-0.9.0.tgz
npm ERR! Error: DEPTH_ZERO_SELF_SIGNED_CERT
npm ERR! at SecurePair.<anonymous> (tls.js:1283:32)
npm ERR! at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:896:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:430:15)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:344:25)
npm ERR! at doWrite (_stream_writable.js:219:10)
npm ERR! at writeOrBuffer (_stream_writable.js:209:5)
npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR! at write (_stream_readable.js:573:24)
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-220.13.1.el6.x86_64
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "redis-0.9.0.tgz"
npm ERR! cwd /home/abc/download
npm ERR! node -v v0.10.6
npm ERR! npm -v 1.2.18
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/abc/download/npm-debug.log
npm ERR! not ok code 0
Try to install it in this way:
npm install ./redis-0.9.0.tgz