Common proxy and networking problems


(Kat Marchán) #1

There’s a bunch of different errors that can pop up when a proxy or network is misconfigured.

npm might not be able to connect to the registry for various reasons. Perhaps your machine is behind a firewall that needs to be opened, or you require a corporate proxy to access the npm registry. This issue can manifest in a wide number of different ways. Usually, strange network errors are an instance of this specific problem.

Sometimes, users may have install failures due to Git/Github access issues. Git/GitHub access is separate from npm registry access. For users in some locations (India in particular), problems installing packages may be due to connectivity problems reaching GitHub and not the npm registry.

If you believe your network is configured and working correctly, and you’re still having problems installing, please let the registry team know you’re having trouble.

Example Errors

This error can manifest in a wide range of different ways:

npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! unable to verify the first certificate
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate
npm ERR! code DEPTH_ZERO_SELF_SIGNED_CERT
npm ERR! self signed certificate
124 error code ECONNREFUSED
125 error errno ECONNREFUSED
126 error syscall connect
136 error Unexpected token <
136 error <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
136 error <HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
136 error <TITLE>ERROR: Cache Access Denied</TITLE>
31 verbose stack Error: connect ETIMEDOUT 123.123.123.123:443
108 error code EAI_AGAIN
109 error errno EAI_AGAIN
110 error syscall getaddrinfo
111 error getaddrinfo EAI_AGAIN proxy.yourcorp.com:811
npm ERR! Error: getaddrinfo ESRCH
npm ERR! at errnoException (dns.js:37:11)
npm ERR! at Object.onanswer as oncomplete
35 error Unexpected token u
35 error function FindProxyForURL(url, host) {

Related issues


Shasum check or integrity/EINTEGRITY errors
(Kat Marchán) #2

Steps to Fix

  1. Make sure you have a working internet connection. Can you reach https://registry.npmjs.org? Can you reach other sites? If other sites are unreachable, this is not a problem with npm.

  2. Check http://status.npmjs.org/ for any potential current service outages.

  3. If your company has a process for domain whitelisting for developers, make sure https://registry.npmjs.org is a whitelisted domain.

  4. If you’re in China, consider using https://npm.taobao.org/ as a registry, which sits behind the Firewall.

  5. On Windows, npm does not access proxies configured at the system level, so you need to configure them manually in order for npm to access them. Make sure you have added the appropriate proxy configuration to .npmrc.

  6. If you already have a proxy configured, it might be configured incorrectly or use the wrong credentials. Verify your credentials, test the specific credentials with a separate application.

  7. The proxy itself, on the server, might also have a configuration error. In this case, you’ll need to work with your system administrator to verify that the proxy, and HTTPS, are configured correctly. You may test it by running regular HTTPS requests.


npm Internal NTLM Proxy Authentication