This repository has been archived by the owner. It is now read-only.

npm does not work behind a proxy if the proxy uses NTLM authentification #2119

Closed
Mithgol opened this Issue Feb 3, 2012 · 38 comments

Comments

Projects
None yet
@Mithgol

Mithgol commented Feb 3, 2012

NPM is currently unable to work from behind NTLM proxies, or maybe it is just underdocumented. Most likely, it doesn't work (according to some comments at #718).

There is currently no NTLM-supporting node modules I know of. It probably means that fixing this issue would require one of the following approaches:

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Feb 3, 2012

Somehow I couldn't make NPM talk to Cntlm at all.

Firefox works through Cntlm, even an ancient Internet Explorer 6 (SP3) works through Cntlm, but NPM fails:

U:\Fido\Soft\_Sources\node\!>npm install zip
npm http GET https://registry.npmjs.org/zip

npm ERR! Error: failed to fetch from registry: zip
npm ERR!     at c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\get.js:139:12
npm ERR!     at cb (c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\request.js:32:9)
npm ERR!     at Request._callback (c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\request.js:137:18)
npm ERR!     at Request.callback (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:109:22)
npm ERR!     at Request.<anonymous> (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:198:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:195:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! 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!
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "c:\\Utils\\Node.js\\\\node.exe" "c:\\Utils\\Node.js\\node_modules\\npm\\bin\\npm-cli.js" "install" "zip"
npm ERR! cwd U:\Fido\Soft\_Sources\node\!
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: zip
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     U:\Fido\Soft\_Sources\node\!\npm-debug.log
npm not ok

The connection between Cntlm and the above proxy does not seem to be initiated. The command npm config get proxy reports http://localhost:8888/ (and that is where my Cntlm is listening).

Mithgol commented Feb 3, 2012

Somehow I couldn't make NPM talk to Cntlm at all.

Firefox works through Cntlm, even an ancient Internet Explorer 6 (SP3) works through Cntlm, but NPM fails:

U:\Fido\Soft\_Sources\node\!>npm install zip
npm http GET https://registry.npmjs.org/zip

npm ERR! Error: failed to fetch from registry: zip
npm ERR!     at c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\get.js:139:12
npm ERR!     at cb (c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\request.js:32:9)
npm ERR!     at Request._callback (c:\Utils\Node.js\node_modules\npm\lib\utils\npm-registry-client\request.js:137:18)
npm ERR!     at Request.callback (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:109:22)
npm ERR!     at Request.<anonymous> (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:198:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (c:\Utils\Node.js\node_modules\npm\node_modules\request\main.js:195:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1134:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! 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!
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "c:\\Utils\\Node.js\\\\node.exe" "c:\\Utils\\Node.js\\node_modules\\npm\\bin\\npm-cli.js" "install" "zip"
npm ERR! cwd U:\Fido\Soft\_Sources\node\!
npm ERR! node -v v0.6.10
npm ERR! npm -v 1.1.0-3
npm ERR! message failed to fetch from registry: zip
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     U:\Fido\Soft\_Sources\node\!\npm-debug.log
npm not ok

The connection between Cntlm and the above proxy does not seem to be initiated. The command npm config get proxy reports http://localhost:8888/ (and that is where my Cntlm is listening).

@ldsenow

This comment has been minimized.

Show comment
Hide comment
@ldsenow

ldsenow Feb 13, 2012

Can you try this

npm config set registry "http://registry.npmjs.org/"

It works for me. I hope it helps you as well

ldsenow commented Feb 13, 2012

Can you try this

npm config set registry "http://registry.npmjs.org/"

It works for me. I hope it helps you as well

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Feb 13, 2012

It works!

Thank you, @ldsenow.

(But now I wonder why HTTPS does not work but HTTP does.

Most likely, Cntlm does not support HTTPS.)

Mithgol commented Feb 13, 2012

It works!

Thank you, @ldsenow.

(But now I wonder why HTTPS does not work but HTTP does.

Most likely, Cntlm does not support HTTPS.)

@mcandre

This comment has been minimized.

Show comment
Hide comment
@mcandre

mcandre Feb 17, 2012

For some reason, this doesn't fix the problem for me. :(

mcandre commented Feb 17, 2012

For some reason, this doesn't fix the problem for me. :(

@ldsenow

This comment has been minimized.

Show comment
Hide comment
@ldsenow

ldsenow Feb 20, 2012

@mcandre I guess you need to config your proxy address as well

please try npm config set proxy your-proxy-address:port

ldsenow commented Feb 20, 2012

@mcandre I guess you need to config your proxy address as well

please try npm config set proxy your-proxy-address:port

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Feb 20, 2012

Specifically, npm config set proxy localhost:pontnum (where portnum is the port number given in the Listen directive inside the cntlm.ini file).

(I assume that you run Cntlm on the same machine where npm is run, hence localhost.)

Mithgol commented Feb 20, 2012

Specifically, npm config set proxy localhost:pontnum (where portnum is the port number given in the Listen directive inside the cntlm.ini file).

(I assume that you run Cntlm on the same machine where npm is run, hence localhost.)

@jitheshm

This comment has been minimized.

Show comment
Hide comment
@jitheshm

jitheshm Apr 24, 2012

Try this. It worked for me.

npm config set proxy http://proxy_host:port

jitheshm commented Apr 24, 2012

Try this. It worked for me.

npm config set proxy http://proxy_host:port

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Apr 25, 2012

Ok, npm works well through Cntlm after npm config set proxy http://localhost:portnumber and npm config set registry http://registry.npmjs.org/.

I am closing this issue.

(I know I should also share this technique in some wiki, but I won't have time for this in any near future.)

Mithgol commented Apr 25, 2012

Ok, npm works well through Cntlm after npm config set proxy http://localhost:portnumber and npm config set registry http://registry.npmjs.org/.

I am closing this issue.

(I know I should also share this technique in some wiki, but I won't have time for this in any near future.)

@Mithgol Mithgol closed this Apr 25, 2012

@vinicius33

This comment has been minimized.

Show comment
Hide comment
@vinicius33

vinicius33 Jun 4, 2013

@Mithgol it's works for me too! Tks!

vinicius33 commented Jun 4, 2013

@Mithgol it's works for me too! Tks!

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Jun 6, 2013

You're welcome.

Mithgol commented Jun 6, 2013

You're welcome.

@christianfajardo

This comment has been minimized.

Show comment
Hide comment
@christianfajardo

christianfajardo Nov 5, 2013

I did a trial and error and blanked out npm's proxy by running -

   npm config set proxy

I did this in conjunction with

   npm config set registry http://registry.npmjs.org

And viola!
Yep, agreed, this is not documented. Or maybe there's a bug?

Btw, didn't have to use/install CNTLM.

christianfajardo commented Nov 5, 2013

I did a trial and error and blanked out npm's proxy by running -

   npm config set proxy

I did this in conjunction with

   npm config set registry http://registry.npmjs.org

And viola!
Yep, agreed, this is not documented. Or maybe there's a bug?

Btw, didn't have to use/install CNTLM.

@richardneililagan

This comment has been minimized.

Show comment
Hide comment
@richardneililagan

richardneililagan Nov 6, 2013

@christianfajardo You wouldn't need CNTLM if you're not behind NTLM authentication.

richardneililagan commented Nov 6, 2013

@christianfajardo You wouldn't need CNTLM if you're not behind NTLM authentication.

@hudson2010

This comment has been minimized.

Show comment
Hide comment
@hudson2010

hudson2010 Apr 14, 2014

Hey guys,I trying to install express but its failing ,I have cntlm installed and it works for wget but npm is failing
[root@uncc-mbuya express-master]# npm install -g express
npm http GET http://registry.npmjs.org/express
npm http GET http://registry.npmjs.org/express
npm http GET http://registry.npmjs.org/express
npm ERR! Error: Invalid protocol
npm ERR! at Request.init (/usr/local/lib/node_modules/npm/node_modules/request/request.js:335:51)
npm ERR! at new Request (/usr/local/lib/node_modules/npm/node_modules/request/request.js:99:8)
npm ERR! at request (/usr/local/lib/node_modules/npm/node_modules/request/index.js:55:11)
npm ERR! at RegClient.makeRequest (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:173:13)
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:96:17)
npm ERR! at null._onTimeout (/usr/local/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js:32:10)
npm ERR! at Timer.listOnTimeout as ontimeout
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 2.6.32-358.11.1.el6.i686
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /home/stats/node_project/express-master
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/stats/node_project/express-master/npm-debug.log
npm ERR! not ok code 0

hudson2010 commented Apr 14, 2014

Hey guys,I trying to install express but its failing ,I have cntlm installed and it works for wget but npm is failing
[root@uncc-mbuya express-master]# npm install -g express
npm http GET http://registry.npmjs.org/express
npm http GET http://registry.npmjs.org/express
npm http GET http://registry.npmjs.org/express
npm ERR! Error: Invalid protocol
npm ERR! at Request.init (/usr/local/lib/node_modules/npm/node_modules/request/request.js:335:51)
npm ERR! at new Request (/usr/local/lib/node_modules/npm/node_modules/request/request.js:99:8)
npm ERR! at request (/usr/local/lib/node_modules/npm/node_modules/request/index.js:55:11)
npm ERR! at RegClient.makeRequest (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:173:13)
npm ERR! at RegClient. (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:96:17)
npm ERR! at null._onTimeout (/usr/local/lib/node_modules/npm/node_modules/retry/lib/retry_operation.js:32:10)
npm ERR! at Timer.listOnTimeout as ontimeout
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 2.6.32-358.11.1.el6.i686
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /home/stats/node_project/express-master
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/stats/node_project/express-master/npm-debug.log
npm ERR! not ok code 0

@othiym23 othiym23 changed the title from NPM does not work behind a proxy if the proxy uses NTLM authentification to npm does not work behind a proxy if the proxy uses NTLM authentification Sep 24, 2014

@othiym23 othiym23 added the support label Sep 24, 2014

@kmrrakesh

This comment has been minimized.

Show comment
Hide comment
@kmrrakesh

kmrrakesh Aug 13, 2015

npm config set proxy http://127.0.0.1:8080

Please - It is throwing error like "npm err!network getaddrinfo ENOTFOUND 127.0.0.1:8080"

kmrrakesh commented Aug 13, 2015

npm config set proxy http://127.0.0.1:8080

Please - It is throwing error like "npm err!network getaddrinfo ENOTFOUND 127.0.0.1:8080"

@kmrrakesh

This comment has been minimized.

Show comment
Hide comment
@kmrrakesh

kmrrakesh Aug 13, 2015

Please look into it as it is not working for me:

npm warn invalid config proxy http://'Accenture\kmrrakesh:Accent@2017'@127.0.0.1:8080
npm warn invalid config Must be a full url with 'http://'

kmrrakesh commented Aug 13, 2015

Please look into it as it is not working for me:

npm warn invalid config proxy http://'Accenture\kmrrakesh:Accent@2017'@127.0.0.1:8080
npm warn invalid config Must be a full url with 'http://'

@sandydcr

This comment has been minimized.

Show comment
Hide comment
@sandydcr

sandydcr Aug 19, 2015

please use
npm config set proxy http://xx.aa.bb.cc:port
it worked for me
thanks a lot !

sandydcr commented Aug 19, 2015

please use
npm config set proxy http://xx.aa.bb.cc:port
it worked for me
thanks a lot !

@kmrrakesh

This comment has been minimized.

Show comment
Hide comment
@kmrrakesh

kmrrakesh Aug 31, 2015

It worked for me.
Thank you sandydcr and all!

kmrrakesh commented Aug 31, 2015

It worked for me.
Thank you sandydcr and all!

@cwhankey

This comment has been minimized.

Show comment
Hide comment
@cwhankey

cwhankey Aug 31, 2015

sorry, but NONE of the combos suggested above work for me. Still getting proxy related errors. Well, npm sounded cool. not ready for prime time maybe?

cwhankey commented Aug 31, 2015

sorry, but NONE of the combos suggested above work for me. Still getting proxy related errors. Well, npm sounded cool. not ready for prime time maybe?

@kmrrakesh

This comment has been minimized.

Show comment
Hide comment
@kmrrakesh

kmrrakesh Sep 1, 2015

Dear cwhankey, it might be because of the settings of the proxy which bars social sites like facebook, gmail and it unfortunately includes links of the required packages while installing express or any other packages.

You need to see that.

kmrrakesh commented Sep 1, 2015

Dear cwhankey, it might be because of the settings of the proxy which bars social sites like facebook, gmail and it unfortunately includes links of the required packages while installing express or any other packages.

You need to see that.

@michaelgugino

This comment has been minimized.

Show comment
Hide comment
@michaelgugino

michaelgugino Mar 1, 2016

This software is garbage. I'm using the latest stable release of npm directly from node's site (binary). I'm still getting tunnel problems, after setting proxies, non-strict ssl, using http registry. It's trying to clone a tarball from github for some package. Give me a break already.

michaelgugino commented Mar 1, 2016

This software is garbage. I'm using the latest stable release of npm directly from node's site (binary). I'm still getting tunnel problems, after setting proxies, non-strict ssl, using http registry. It's trying to clone a tarball from github for some package. Give me a break already.

@yellek

This comment has been minimized.

Show comment
Hide comment
@yellek

yellek Mar 23, 2016

With cntlm running on port 3128 on my local machine (the default) I put the following in my .npmrc file in my home directory which is now working:

https-proxy=http://127.0.0.1:3128
proxy=http://127.0.0.1:3128
registry=http://registry.npmjs.org/

yellek commented Mar 23, 2016

With cntlm running on port 3128 on my local machine (the default) I put the following in my .npmrc file in my home directory which is now working:

https-proxy=http://127.0.0.1:3128
proxy=http://127.0.0.1:3128
registry=http://registry.npmjs.org/

@ManFromEast

This comment has been minimized.

Show comment
Hide comment
@ManFromEast

ManFromEast Apr 1, 2016

great answer!
thanks @ldsenow
I have tried OXS and ubuntu VM on mac
in OXS I only set the proxy in .npmrc file as following:
npm config set proxy http://username:password@proxyserver_ip:proxyserver_port
npm config set https-proxy https://username:password@proxyserver_ip:proxyserver_port

it works, but in ubuntu VM
I just set proxy, but it can't work, until I add the below command, it works in Ubuntu VM.
npm config set registry http://registry.npmjs.org/

check all configuration : npm config list

ManFromEast commented Apr 1, 2016

great answer!
thanks @ldsenow
I have tried OXS and ubuntu VM on mac
in OXS I only set the proxy in .npmrc file as following:
npm config set proxy http://username:password@proxyserver_ip:proxyserver_port
npm config set https-proxy https://username:password@proxyserver_ip:proxyserver_port

it works, but in ubuntu VM
I just set proxy, but it can't work, until I add the below command, it works in Ubuntu VM.
npm config set registry http://registry.npmjs.org/

check all configuration : npm config list

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Apr 4, 2016

Recently npm registry has gone to HTTPS.

It means that Cntlm does no longer help to reach npm (because it does not seem to tunnel HTTPS).

Mithgol commented Apr 4, 2016

Recently npm registry has gone to HTTPS.

It means that Cntlm does no longer help to reach npm (because it does not seem to tunnel HTTPS).

@Mithgol

This comment has been minimized.

Show comment
Hide comment
@Mithgol

Mithgol Apr 4, 2016

Personally I am no longer affected by this issue (i.e. I am no longer behind a proxy).

However, because I've previously closed this issue with the reason like “Cntlm works”, I feel compelled to reopen it now (with the reason “Cntlm does not work any longer”).

Mithgol commented Apr 4, 2016

Personally I am no longer affected by this issue (i.e. I am no longer behind a proxy).

However, because I've previously closed this issue with the reason like “Cntlm works”, I feel compelled to reopen it now (with the reason “Cntlm does not work any longer”).

@Mithgol Mithgol reopened this Apr 4, 2016

@bcamposq1995

This comment has been minimized.

Show comment
Hide comment
@bcamposq1995

bcamposq1995 Apr 19, 2016

i solve with this:
1- get your proxy server and port in Window key -> Configure Proxy Server -> Lan Settings -> Address and port
2- put this in C:\Users\your.user.npmrc
https-proxy=http://address:port
proxy=http://address:port
registry=http://registry.npmjs.org/

Then npm install express

bcamposq1995 commented Apr 19, 2016

i solve with this:
1- get your proxy server and port in Window key -> Configure Proxy Server -> Lan Settings -> Address and port
2- put this in C:\Users\your.user.npmrc
https-proxy=http://address:port
proxy=http://address:port
registry=http://registry.npmjs.org/

Then npm install express

@uniwizardcom

This comment has been minimized.

Show comment
Hide comment
@uniwizardcom

uniwizardcom Apr 26, 2016

Yes, it very important to add "http://" prefix for proxy IP address! It was my fault when I first time tried of configure npm.

uniwizardcom commented Apr 26, 2016

Yes, it very important to add "http://" prefix for proxy IP address! It was my fault when I first time tried of configure npm.

@snopeks

This comment has been minimized.

Show comment
Hide comment
@snopeks

snopeks May 4, 2016

Contributor

Hello @Mithgol ! In this situation, changing https urls to http should resolve this proxy config issue, as cntlm only works via http. I'm going to close as resolved, but if you continue to have issues or any other questions, please write into support@npmjs.com and we'll be happy to help.

Contributor

snopeks commented May 4, 2016

Hello @Mithgol ! In this situation, changing https urls to http should resolve this proxy config issue, as cntlm only works via http. I'm going to close as resolved, but if you continue to have issues or any other questions, please write into support@npmjs.com and we'll be happy to help.

@snopeks snopeks closed this May 4, 2016

@ramazanpolat

This comment has been minimized.

Show comment
Hide comment
@ramazanpolat

ramazanpolat Aug 11, 2016

I am behind an NTLM proxy.
Tried these and it worked!

npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128

ramazanpolat commented Aug 11, 2016

I am behind an NTLM proxy.
Tried these and it worked!

npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128

@cmelion cmelion referenced this issue Aug 27, 2016

Closed

Nothing works . #69

@ForsakenEcho

This comment has been minimized.

Show comment
Hide comment
@ForsakenEcho

ForsakenEcho Sep 30, 2016

I setup everything still does not work. I'm in windows.

ForsakenEcho commented Sep 30, 2016

I setup everything still does not work. I'm in windows.

@ramazanpolat

This comment has been minimized.

Show comment
Hide comment
@ramazanpolat

ramazanpolat Sep 30, 2016

@ForsakenEcho
Set proxy to your CNTLM on firefox to be sure that CNTLM is configured correctly(not another browser, others use system proxy setting while firefox has it's own proxy settings). If it doesn't work, visit this SO answer and configure CNTLM properly.

Then use these commands:
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128

I am using Windows too. I've just tried it and it's working.

ramazanpolat commented Sep 30, 2016

@ForsakenEcho
Set proxy to your CNTLM on firefox to be sure that CNTLM is configured correctly(not another browser, others use system proxy setting while firefox has it's own proxy settings). If it doesn't work, visit this SO answer and configure CNTLM properly.

Then use these commands:
npm config set registry "http://registry.npmjs.org/"
npm config set proxy http://127.0.0.1:3128
npm config set https-proxy http://127.0.0.1:3128

I am using Windows too. I've just tried it and it's working.

@tobiaxor

This comment has been minimized.

Show comment
Hide comment
@tobiaxor

tobiaxor Dec 5, 2016

I think CNTLM might have troubles when the authentication mode is NEGOTIATE, which might resolve to Kerberos as well, especially if you're working in a windows environment. CNTLM does not work with Kerberos AFAIK. If that's the case, you probably won't find any workaround, except quitting your job :)
CNTLM works only with basic/NTLM authentication. You can check your authentication mode with fiddler, snooping out the authentication headers and the potential 407 response.

tobiaxor commented Dec 5, 2016

I think CNTLM might have troubles when the authentication mode is NEGOTIATE, which might resolve to Kerberos as well, especially if you're working in a windows environment. CNTLM does not work with Kerberos AFAIK. If that's the case, you probably won't find any workaround, except quitting your job :)
CNTLM works only with basic/NTLM authentication. You can check your authentication mode with fiddler, snooping out the authentication headers and the potential 407 response.

@aecorredor

This comment has been minimized.

Show comment
Hide comment
@aecorredor

aecorredor Dec 16, 2016

I have tried all the troubleshooting steps that you find on google, stackoverflow, and GitHub when searching for this issue. I still have not been able to fix it, here is the error I'm getting now: (I only have strict-ssl set to false right now, I took out the proxy keys, if I had them I would just get a ECONNREFUSED error)

npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=Parse Error
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

aecorredor commented Dec 16, 2016

I have tried all the troubleshooting steps that you find on google, stackoverflow, and GitHub when searching for this issue. I still have not been able to fix it, here is the error I'm getting now: (I only have strict-ssl set to false right now, I took out the proxy keys, if I had them I would just get a ECONNREFUSED error)

npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ECONNRESET

npm ERR! network tunneling socket could not be established, cause=Parse Error
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

@genotrance

This comment has been minimized.

Show comment
Hide comment
@genotrance

genotrance Mar 31, 2017

Or if you are running npm on Windows, just use Px: http://github.com/genotrance/px

No need to provide any credentials - Px just authenticates as the logged in user. Super easy to setup and use and no worries of locking out your account cause you forgot to update the CNTLM.ini password hashes.

genotrance commented Mar 31, 2017

Or if you are running npm on Windows, just use Px: http://github.com/genotrance/px

No need to provide any credentials - Px just authenticates as the logged in user. Super easy to setup and use and no worries of locking out your account cause you forgot to update the CNTLM.ini password hashes.

@tobiaxor

This comment has been minimized.

Show comment
Hide comment
@tobiaxor

tobiaxor Apr 2, 2017

I think that if your proxy uses only Kerberos, neither Px nor CNTLM will help you, they both work only with NTLM.

tobiaxor commented Apr 2, 2017

I think that if your proxy uses only Kerberos, neither Px nor CNTLM will help you, they both work only with NTLM.

@NewWorldMan

This comment has been minimized.

Show comment
Hide comment
@NewWorldMan

NewWorldMan Jul 14, 2017

I get almost the same error, with the same versions, as aecorredor above...
`npm WARN invalid config proxy="npm"
npm WARN invalid config Must be a full url with 'http://'
npm WARN invalid config proxy="npm"
npm WARN invalid config Must be a full url with 'http://'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:`

Not sure what to do. Does the post above insinuate I can use that Px link above to get the needed node_modules to run on the angular build I have?

That's basically what I need.

Thanks!

NewWorldMan commented Jul 14, 2017

I get almost the same error, with the same versions, as aecorredor above...
`npm WARN invalid config proxy="npm"
npm WARN invalid config Must be a full url with 'http://'
npm WARN invalid config proxy="npm"
npm WARN invalid config Must be a full url with 'http://'
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\
node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! syscall getaddrinfo

npm ERR! network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:80
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'

npm ERR! Please include the following file with any support request:`

Not sure what to do. Does the post above insinuate I can use that Px link above to get the needed node_modules to run on the angular build I have?

That's basically what I need.

Thanks!

@genotrance

This comment has been minimized.

Show comment
Hide comment
@genotrance

genotrance Jul 14, 2017

It looks like your npm config isn't set correctly. What's the output of npm config list? Here's what it should be if you are using CNTLM or Px.

https-proxy = "http://localhost:3128/"
proxy = "http://localhost:3128/"

You can configure it correctly as mentioned above by ramazanpolat:-

npm config set proxy http://localhost:3128
npm config set https-proxy http://localhost:3128

genotrance commented Jul 14, 2017

It looks like your npm config isn't set correctly. What's the output of npm config list? Here's what it should be if you are using CNTLM or Px.

https-proxy = "http://localhost:3128/"
proxy = "http://localhost:3128/"

You can configure it correctly as mentioned above by ramazanpolat:-

npm config set proxy http://localhost:3128
npm config set https-proxy http://localhost:3128
@NewWorldMan

This comment has been minimized.

Show comment
Hide comment
@NewWorldMan

NewWorldMan Jul 14, 2017

NewWorldMan commented Jul 14, 2017

@NewWorldMan

This comment has been minimized.

Show comment
Hide comment
@NewWorldMan

NewWorldMan Jul 14, 2017

NewWorldMan commented Jul 14, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.