DEV Community

Martin Soderlund Ek
Martin Soderlund Ek

Posted on

7

Set npm Proxy

When you do an npm install and get an error message like this one:

npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to https://registry.npmjs.org/windows-build-tools failed, reason: Client network socket disconnected before secure TLS connection was established
npm ERR! network This is a problem 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'

Enter fullscreen mode Exit fullscreen mode

the problem might be you're behind a proxy and need to configure this for npm.

You need to set proxy and https-proxy for npm, like this (in your preferred command tool):

npm config set proxy http://your-proxy-url:8080
npm config set https-proxy https://your-proxy-url:8080
Enter fullscreen mode Exit fullscreen mode

Setting strict-ssl to false might be an idea too, if you really know what you're doing.

npm config set strict-ssl false
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay