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)

如何使用cordova解决此类型pf CERT_UNTRUSTED问题?

我也试过这个命令:

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!错误的ERR!错误的ERR!错误的ERR!错误的ERR!错误的ERR! at Object.parse(native)npm ERR!在RegClient . (C:\ Program Files \ nodejs \ node_modules \ n node_modules \ npm-registry-client \ lib \ request.js:274:23)npm ERR!在Request._callback(C:\ Program Files \ nodejs \ node_modules \ npm \ n _modules \ npm-registry-client \ lib \ request.js:246:65)npm ERR!在Request.self.callback(C:\ Program Files \ nodejs \ node_modules \ n node_modules \ request \ request.js:236:22)npm ERR!在Request.emit(events.js:98:17)npm ERR!在请求 . (C:\ Program Files \ nodejs \ node_modules \ npm de_modules \ request \ request.js:1142:14)npm ERR!在Request.emit(events.js:117:20)npm ERR!在IncomingMessage . (C:\ Program Files \ nodejs \ node_mod s \ npm \ node_modules \ request \ request.js:1096:12)npm ERR!在IncomingMessage.emit(events.js:117:20)npm ERR!在_stream_readable.js:944:16 npm ERR!如果您需要帮助,可以报告整个日志,npm ERR!包括npm和node版本,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!输入unexpected_token npm ERR!not ok code 0

node -v
v0.10.35