Hi,
I am trying to install Angular CLI running npm install -g @angular/cli, getting the following node-saas error:-
`> [email protected] install C:windowssystem32my-appnode_modulesnode-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-59_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-59_binding.node":
tunneling socket could not be established, statusCode=407`
npm version = 5.5.1
Node version = v9.2.0
OS = Windows 10
My proxy is and registry are set.
Any ideas?
Thanks in advance.
407 is a proxy authenitication issue. This isn't something we can help you with.
https://httpstatuses.com/407
I found that proxyAuth is null in the http header, where all the proxy settings are provided in my npmrc (ie: username:password@proxy).
In my case, I'm behind a commercial proxy set up and also using a private registry out side the organization. I have to use proxy settings in order to access the registry. Registry calls are successful but this error occurs if and only if it calls non-registry urls over tunnel-agent.
Error stack:
gyp ERR! stack Error: tunneling socket could not be established, statusCode=407
gyp ERR! stack at ClientRequest.onConnect (C:#####node_modulestunnel-agentindex.js:180:19)
gyp ERR! stack at ClientRequest.g (events.js:292:16)
gyp ERR! stack at emitThree (events.js:116:13)
gyp ERR! stack at ClientRequest.emit (events.js:194:7)
gyp ERR! stack at Socket.socketOnData (_http_client.js:395:11)
gyp ERR! stack at emitOne (events.js:96:13)
gyp ERR! stack at Socket.emit (events.js:188:7)
gyp ERR! stack at readableAddChunk (_stream_readable.js:176:18)
gyp ERR! stack at Socket.Readable.push (_stream_readable.js:134:10)
gyp ERR! stack at TCP.onread (net.js:547:20)
And the request header:
{ host: 'myproxy',
port: 8085,
proxyAuth: null,
headers:
{ 'User-Agent': 'node-gyp v3.8.0 (node v6.11.3)',
host: 'nodejs.org:443' } }
//Hope this provide enough info
Thank you.
as this is the first result in google for this error, we might as well have the solution here:
npm config set proxy http://yourproxyaddress:port
npm config set https-proxy http://yourproxyaddress:port
npm config set strict-ssl false
you get 407 when you usually try to authenticate on NTLM corporate proxy directly from "linux world tools". Instead to fight aginst 407, simply install CNTLM (sudo apt-get install cntlm) and configure it to "pre-authenticate" your user on you r corporate domain proxy. Then you can use locally the CNTLM proxy on http://localhost:3128 without credentials. This will solve your problems with 407
i get following error when i run mercury parser api in node
proxy is set but still getting error
(node:15540) UnhandledPromiseRejectionWarning: Error: tunneling socket could not be established, statusCode=407
at ClientRequest.onConnect (C:Usersa662140DesktopKaranCustom Search [email protected]:182:19)
at Object.onceWrapper (events.js:313:26)
at ClientRequest.emit (events.js:223:5)
at Socket.socketOnData (_http_client.js:490:11)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
(node:15540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15540) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Most helpful comment
as this is the first result in google for this error, we might as well have the solution here: