Cordova Installation Issue - node.js

npm ERR! Error: CERT_UNTRUSTED
npm ERR! at SecurePair.<anonymous> (tls.js:1381:32)
npm ERR! at SecurePair.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:980:10)
How do I resolve this type pf CERT_UNTRUSTED issue with cordova?
I tried this command as well:
npm config set strict-ssl false
npm config set strict-ssl false
npm install -g cordova
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/html4/strict.dtd">
npm ERR! <html>
npm ERR! <head>
npm ERR! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859>
npm ERR! <title>Connect Error</title>
npm ERR! <link rel="stylesheet" href="https://registry.npmjs.org/%24%24%24%26%26%3f%24%24%24cmd=get_file&arg=block_style.css&sid=BEC8C289A9A5DE0FB7FCF45FF089A5978C175" type="text/css">
npm ERR! </head>
npm ERR! <body>
npm ERR!
npm ERR! <div id="pagecontainer">
npm ERR! <img class="icon" src="https://registry.npmjs.org/%24%24%24%3f%26%3f%24%24%24? cmd=get_file&arg=images/block.png&sid=40078573687B43FE5729956319CEF3479DB74"
npm ERR! <h1>Could not connect to server</h1>
npm ERR!
npm ERR! <div class="row">
npm ERR! <p class="label">Overview:</p>
npm ERR! <p class="item">Could not connect to registry.npmjs.
.</p>
npm ERR! </div>
npm ERR! <div class="row">
npm ERR! <p class="label">Details:</p>
npm ERR! <p class="item">Peer suddenly disconnected found</p>
npm ERR! </div>
npm ERR!
npm ERR! <div id="options">
npm ERR! <p class="label">Options:</p>
npm ERR! <form action=""><input type="button" class="button"click="history.back();" value=" Go Back "></form><p class="item">Pressing button allows you to go to the previous page.</p>
npm ERR! <p class="last-item">You can try to reload the page
check if the URL is correct.</p>
npm ERR! </div>
npm ERR!
npm ERR! <div><img class="logo" title="Websense" src="https://registrpmjs.org/%24%24%24%26%3f%26%3f%24%24%24cmd=get_file&arg=images/wslogo_block_e.png&sid=CC7ECAEDE4907BCA9C2E449D9F12E1601D42E845"alt="WebsenseLogo">
npm ERR! <div style="clear: both; overflow: hidden; height:1p
npm ERR!
npm ERR!
npm ERR!
npm ERR!
npm ERR!
npm ERR! at Object.parse (native)
npm ERR! at RegClient. (C:\Program Files\nodejs\node_modules\n
node_modules\npm-registry-client\lib\request.js:274:23)
npm ERR! at Request._callback (C:\Program Files\nodejs\node_modules\npm\n
_modules\npm-registry-client\lib\request.js:246:65)
npm ERR! at Request.self.callback (C:\Program Files\nodejs\node_modules\n
node_modules\request\request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request. (C:\Program Files\nodejs\node_modules\npm
de_modules\request\request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage. (C:\Program Files\nodejs\node_mod
s\npm\node_modules\request\request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:944:16
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:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova"
npm ERR! cwd C:\Users\salangar
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! type unexpected_token
npm ERR! not ok code 0
node -v
v0.10.35

Related

npm install ember#2.18 gives SyntaxError: Unexpected token <

When I try to run $ npm install to install all modules on project, or when trying to install ember v 2.18 with $ npm install ember#2.18 it gives me the error:
npm http GET https://www.npmjs.com/ember
npm http 200 https://www.npmjs.com/ember
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR!
npm ERR! <!doctype html>
npm ERR! <html>
. . .
. . .
npm ERR! </html>
npm ERR!
npm ERR! at Object.parse (native)
npm ERR! at RegClient.<anonymous> (/home/felipe/.nvm/v0.8.16/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:226:23)
npm ERR! at Request.init.self.callback (/home/felipe/.nvm/v0.8.16/lib/node_modules/npm/node_modules/request/main.js:120:22)
npm ERR! at Request.EventEmitter.emit (events.js:99:17)
npm ERR! at Request.<anonymous> (/home/felipe/.nvm/v0.8.16/lib/node_modules/npm/node_modules/request/main.js:648:16)
npm ERR! at Request.EventEmitter.emit (events.js:126:20)
npm ERR! at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/home/felipe/.nvm/v0.8.16/lib/node_modules/npm/node_modules/request/main.js:610:14)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:126:20)
npm ERR! at IncomingMessage._emitEnd (http.js:366:10)
npm ERR! at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
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.9.0-8-amd64
npm ERR! command "/home/felipe/.nvm/v0.8.16/bin/node" "/home/felipe/.nvm/v0.8.16/bin/npm" "install" "ember#2.18"
npm ERR! cwd /workspace/.../projects/...
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! type unexpected_token
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 4.9.0-8-amd64
npm ERR! command "/home/felipe/.nvm/v0.8.16/bin/node" "/home/felipe/.nvm/v0.8.16/bin/npm" "install" "ember#2.18"
npm ERR! cwd /workspace/.../projects/...
npm ERR! node -v v0.8.16
npm ERR! npm -v 1.1.69
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /workspace/.../projects/.../npm-debug.log
npm ERR! not ok code 0
I tried with sudo, no luck.
I also tried to uninstall NPM and NodeJS, but no luck also.
How do I fix that? Is this a problem with my NPM or NodeJS installation?
The default npm registry can be found at;
https://registry.npmjs.org/
However, (according to your error log), yours appears to be currently set to:
https://www.npmjs.com/
Try running the following npm-config command to set the registry:
$ npm config set registry https://registry.npmjs.org/

How to fix Authorization Required error in node.js?

In node.js I was getting problems (Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN) with getting libraries, so I tried the solution from here
receiving error: 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm
which is to run
npm config set strict-ssl false
and now when I try to get a library, I get this:
npm ERR! registry error parsing json
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\node
node_modules\\npm\\bin\\npm-cli.js" "install" "imagemin"
npm ERR! node v4.4.4
npm ERR! npm v2.15.1
npm ERR! Unexpected token <
npm ERR! <HEAD><TITLE>Authorization Required</TITLE></HEAD>
npm ERR! <BODY BGCOLOR="white" FGCOLOR="black"><H1>Authorization Required</H
R>
npm ERR! <FONT FACE="Helvetica,Arial"><B>
npm ERR! Description: Authorization is required for access to this proxy</B>
NT>
npm ERR! <HR>
npm ERR! <!-- default "Authorization Required" response (401) -->
npm ERR! </BODY>
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\me\Desktop\site\tools\npm-debug.log
Does anyone know how to fix it?
Thanks

Cannot install less on Centos 6.6 by npm (Error: failed to fetch from registry: less)

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?

Error while installing Bower

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

Error updating nodejs using npm

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.

Resources