I am facing a certificate error while trying to install NPM packages on Windows. I am using Node v10.9.0
Clash Royale CLAN TAG#URR8PPP
up vote
11
down vote
favorite
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/http-server failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
node.js npm
add a comment |Â
up vote
11
down vote
favorite
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/http-server failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
node.js npm
1
That's really interesting, I confirm theregistry.npmjs.org
cert is invalid, it's issued toa.sni.fastly.net
so there's domain name mismatch (Chrome showsERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.
– Wiktor Zychla
Sep 1 at 12:12
1
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23
add a comment |Â
up vote
11
down vote
favorite
up vote
11
down vote
favorite
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/http-server failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
node.js npm
npm ERR! code ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! errno ERR_TLS_CERT_ALTNAME_INVALID
npm ERR! request to https://registry.npmjs.org/http-server failed, reason: Hostname/IP does not match certificate's altnames: Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net
node.js npm
edited Sep 2 at 3:23


Boann
35.6k1184116
35.6k1184116
asked Sep 1 at 11:56
tech4GT
594
594
1
That's really interesting, I confirm theregistry.npmjs.org
cert is invalid, it's issued toa.sni.fastly.net
so there's domain name mismatch (Chrome showsERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.
– Wiktor Zychla
Sep 1 at 12:12
1
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23
add a comment |Â
1
That's really interesting, I confirm theregistry.npmjs.org
cert is invalid, it's issued toa.sni.fastly.net
so there's domain name mismatch (Chrome showsERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.
– Wiktor Zychla
Sep 1 at 12:12
1
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23
1
1
That's really interesting, I confirm the
registry.npmjs.org
cert is invalid, it's issued to a.sni.fastly.net
so there's domain name mismatch (Chrome shows ERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.– Wiktor Zychla
Sep 1 at 12:12
That's really interesting, I confirm the
registry.npmjs.org
cert is invalid, it's issued to a.sni.fastly.net
so there's domain name mismatch (Chrome shows ERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.– Wiktor Zychla
Sep 1 at 12:12
1
1
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
It seems that it's a real problem on the NPM servers. I see the same error when navigating to https://registry.npmjs.org/http-server
in a browser. The server indeed doesn't have a valid certificate. Nothing Windows-specific.
NPM reports there's an issue with incorrect DNS information being cached, here: https://status.npmjs.org/incidents/v22ffls5cd6h
Until the cache clears up, they suggest doing the following:
dig registry.npmjs.com @1.1.1.1
- Add the IP found to your /etc/hosts file.
Update: A bit unrelated, for ones using yarn
: Yarn's mirror of the NPM registry seems to be affected by this problem too, so it seems that at the moment all we can do is wait until the issue resolves itself or the Yarn team applies a workaround on the server.
add a comment |Â
up vote
1
down vote
The officially suggested solution with adding IPs found via the dig command into the hosts file somehow didn't work for me.
I found that there is a strict-ssl configuration option for npm.
Creating a .npmrc file in my project folder with strict-ssl = false
solved the issue.
I find this solution safer and more isolated since editing the hosts file might not be possible for everyone and when it is, it will cause every request made from your computer to be routed to a specific IP address.
I plan to remove that file when this temporary issue is fixed.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
It seems that it's a real problem on the NPM servers. I see the same error when navigating to https://registry.npmjs.org/http-server
in a browser. The server indeed doesn't have a valid certificate. Nothing Windows-specific.
NPM reports there's an issue with incorrect DNS information being cached, here: https://status.npmjs.org/incidents/v22ffls5cd6h
Until the cache clears up, they suggest doing the following:
dig registry.npmjs.com @1.1.1.1
- Add the IP found to your /etc/hosts file.
Update: A bit unrelated, for ones using yarn
: Yarn's mirror of the NPM registry seems to be affected by this problem too, so it seems that at the moment all we can do is wait until the issue resolves itself or the Yarn team applies a workaround on the server.
add a comment |Â
up vote
4
down vote
It seems that it's a real problem on the NPM servers. I see the same error when navigating to https://registry.npmjs.org/http-server
in a browser. The server indeed doesn't have a valid certificate. Nothing Windows-specific.
NPM reports there's an issue with incorrect DNS information being cached, here: https://status.npmjs.org/incidents/v22ffls5cd6h
Until the cache clears up, they suggest doing the following:
dig registry.npmjs.com @1.1.1.1
- Add the IP found to your /etc/hosts file.
Update: A bit unrelated, for ones using yarn
: Yarn's mirror of the NPM registry seems to be affected by this problem too, so it seems that at the moment all we can do is wait until the issue resolves itself or the Yarn team applies a workaround on the server.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
It seems that it's a real problem on the NPM servers. I see the same error when navigating to https://registry.npmjs.org/http-server
in a browser. The server indeed doesn't have a valid certificate. Nothing Windows-specific.
NPM reports there's an issue with incorrect DNS information being cached, here: https://status.npmjs.org/incidents/v22ffls5cd6h
Until the cache clears up, they suggest doing the following:
dig registry.npmjs.com @1.1.1.1
- Add the IP found to your /etc/hosts file.
Update: A bit unrelated, for ones using yarn
: Yarn's mirror of the NPM registry seems to be affected by this problem too, so it seems that at the moment all we can do is wait until the issue resolves itself or the Yarn team applies a workaround on the server.
It seems that it's a real problem on the NPM servers. I see the same error when navigating to https://registry.npmjs.org/http-server
in a browser. The server indeed doesn't have a valid certificate. Nothing Windows-specific.
NPM reports there's an issue with incorrect DNS information being cached, here: https://status.npmjs.org/incidents/v22ffls5cd6h
Until the cache clears up, they suggest doing the following:
dig registry.npmjs.com @1.1.1.1
- Add the IP found to your /etc/hosts file.
Update: A bit unrelated, for ones using yarn
: Yarn's mirror of the NPM registry seems to be affected by this problem too, so it seems that at the moment all we can do is wait until the issue resolves itself or the Yarn team applies a workaround on the server.
edited Sep 2 at 3:24


Boann
35.6k1184116
35.6k1184116
answered Sep 1 at 12:19
Egor Kalinichev
414
414
add a comment |Â
add a comment |Â
up vote
1
down vote
The officially suggested solution with adding IPs found via the dig command into the hosts file somehow didn't work for me.
I found that there is a strict-ssl configuration option for npm.
Creating a .npmrc file in my project folder with strict-ssl = false
solved the issue.
I find this solution safer and more isolated since editing the hosts file might not be possible for everyone and when it is, it will cause every request made from your computer to be routed to a specific IP address.
I plan to remove that file when this temporary issue is fixed.
add a comment |Â
up vote
1
down vote
The officially suggested solution with adding IPs found via the dig command into the hosts file somehow didn't work for me.
I found that there is a strict-ssl configuration option for npm.
Creating a .npmrc file in my project folder with strict-ssl = false
solved the issue.
I find this solution safer and more isolated since editing the hosts file might not be possible for everyone and when it is, it will cause every request made from your computer to be routed to a specific IP address.
I plan to remove that file when this temporary issue is fixed.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The officially suggested solution with adding IPs found via the dig command into the hosts file somehow didn't work for me.
I found that there is a strict-ssl configuration option for npm.
Creating a .npmrc file in my project folder with strict-ssl = false
solved the issue.
I find this solution safer and more isolated since editing the hosts file might not be possible for everyone and when it is, it will cause every request made from your computer to be routed to a specific IP address.
I plan to remove that file when this temporary issue is fixed.
The officially suggested solution with adding IPs found via the dig command into the hosts file somehow didn't work for me.
I found that there is a strict-ssl configuration option for npm.
Creating a .npmrc file in my project folder with strict-ssl = false
solved the issue.
I find this solution safer and more isolated since editing the hosts file might not be possible for everyone and when it is, it will cause every request made from your computer to be routed to a specific IP address.
I plan to remove that file when this temporary issue is fixed.
edited Sep 2 at 3:28


Boann
35.6k1184116
35.6k1184116
answered Sep 1 at 12:46
koraytaylan
4192613
4192613
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52127857%2fi-am-facing-a-certificate-error-while-trying-to-install-npm-packages-on-windows%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
That's really interesting, I confirm the
registry.npmjs.org
cert is invalid, it's issued toa.sni.fastly.net
so there's domain name mismatch (Chrome showsERR_CERT_COMMON_NAME_INVALID
). I don't think it's intented and looks like a serious issue at the npm registry side. Hope they fix it asap.– Wiktor Zychla
Sep 1 at 12:12
1
Check status.npmjs.org
– wyrdrender
Sep 1 at 12:13
Thankyou everyone!! The issue seems to be fixed now.
– tech4GT
Sep 2 at 13:23