Request would cause a cycle


(Bilow) #1

Hi,

I would like to use npm install and I’m behind a dead simple proxy.

I am on Windows 10 using WSL I have set http_proxy and https_proxy environment variables.

When running npm install -g <package>, I have this error:

npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=connect ENETUNREACH 0.0.31.144:80 - Local (0.0.0.0:50862)
npm ERR! network This is most likely not a problem with npm itself
...

For some reason, http_proxy seems ignored, so I executed a dozen of commands from this post:


Now http_proxy with all variants (lowercase, uppercase, http, https, npm registry, npm proxy, etc) is set.

When running npm install again, I have this error:

$ npm install -g vsce
npm ERR! registry error parsing json
npm ERR! Linux 4.4.0-43-Microsoft
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "vsce"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2

npm ERR! Unexpected token <
npm ERR! <HEAD><TITLE>Cycle Detected</TITLE></HEAD>
npm ERR! <BODY BGCOLOR="white" FGCOLOR="black"><H1>Cycle Detected</H1><HR>
npm ERR! <FONT FACE="Helvetica,Arial"><B>
npm ERR! Description: Your request is prohibited because it would cause a cycle.</B></FONT>
npm ERR! <HR>
npm ERR! <!-- default "Cycle Detected" response (400) -->
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!     /home/bilow/npm-debug.log

All other binaries (apt, curl, …) work with my http_proxy variables.

How can I use npm install?

Thank you

$ npm --versions
{ npm: '3.5.2',
  ares: '1.10.1-DEV',
  http_parser: '2.5.0',
  icu: '55.1',
  modules: '46',
  node: '4.2.6',
  openssl: '1.0.2g',
  uv: '1.8.0',
  v8: '4.5.103.35',
  zlib: '1.2.8' }
$ node -p process.platform
zsh: command not found: node

Note: this is duplicate of this support request, but as support doesn’t know I assume this is a bug.

Let me know if you need more info.


(Joshua) #2

Does running curl http://registry.npmjs.org/vsce work?


(Bilow) #3

Yes. It spits out the JSON data.