Enquanto escreve npm install learnyounode -g no terminal? 12,04 LTS

0
~$ npm install learnyounode -g

npm ERR! registry error parsing json

npm ERR! SyntaxError: Unexpected token <

npm ERR! <!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="content-type"content="text/html;charset=utf-8"/><title></title><script type="text/javascript">StaticRequestInfo={Referer:document.referrer};function EscapeBrowserFrame(){try{if(window.top.location==window.self.location){}else{window.top.location.href=document.location.href}}catch(Error){}}function SetRequestTitle(){document.title=document.domain}function InitiateFrameRequest(){var url = "/?acc=0F4B1727-114A-4EF2-AC1B-1DB964D84818&ref=install+learnyounode&framerequest=1&pcc=";document.write("<frameset rows=\"100%,*\" frameborder=\"no\" border=\"0\" framespacing=\"0\"><frame src=\""+url+"\" name=\"landingparent\" id=\"landingparent\">
<\/frameset>")}SetRequestTitle();EscapeBrowserFrame();</script></head><script type="text/javascript">InitiateFrameRequest();</script><body><noscript><meta http-equiv="refresh" content="0;url=/?acc=0F4B1727-114A-4EF2-AC1B-1DB964D84818&ref=install+learnyounode&framerequest=1&noscript=1&pcc="></noscript><noframes><meta http-equiv="refresh" content="0;url=/?acc=0F4B1727-114A-4EF2-AC1B-1DB964D84818&ref=install+learnyounode&framerequest=1&noscript=1&pcc="></noframes></body></html>
npm ERR!     at Object.parse (native)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:274:23)
npm ERR!     at /usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:251:7
npm ERR!     at Gunzip.onEnd (zlib.js:167:5)

npm ERR!     at Gunzip.emit (events.js:117:20)

npm ERR!     at _stream_readable.js:944:16

npm ERR!     at process._tickCallback (node.js:448:13)

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 Linux 3.8.0-44-generic

npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "learnyounode" "-g"

npm ERR! cwd /home/hypertext

npm ERR! node -v v0.10.37

npm ERR! npm -v 1.4.28

npm ERR! type unexpected_token

npm ERR! 

npm ERR! Additional logging details can be found in:
npm ERR!     /home/hypertext/npm-debug.log
npm ERR! not ok code 0

=============================================== ================= hipertexto @ hipertexto-desktop: ~ $ npm config set proxy http: hipertexto @ hipertexto-desktop: config $ ~ npm obter proxy npm WARN proxy de configuração inválido="http:" npm WARN configuração inválida Deve ser uma URL completa com 'http: //' nulo hipertexto @ hipertexto-desktop: config $ ~ npm get https-proxy npm WARN proxy de configuração inválido="http:" npm WARN configuração inválida Deve ser uma URL completa com 'http: //' nulo hipertexto @ hipertexto-desktop: ~ $

    
por Kaushik Das 24.08.2015 / 21:16

1 resposta

0

Este é um problema relacionado aos certificados SSL, e é mais comum quando você está tentando executar npm por trás um proxy . Existem algumas formas de resolver este problema:

por Michael Martin-Smucker 24.08.2015 / 23:52