Hello @JStus ,
Welcome to Microsoft Q&A forum.
I checked on my side and the command worked well. This blog: More help with SELF_SIGNED_CERT_IN_CHAIN and npm may explain why this error occurred.
So what happened?
Old versions of the npm client used a certificate authority (CA) file that was bundled into the client itself. This was previously necessary because the client used a self-signed SSL certificate (not a great idea, but history can’t be changed).
The bundled CA does not work with our latest SSL certificate, pushed out over the last few days. We knew this, but didn’t realize the number of people who now use npm in environments where updating nom is difficult or slow. We are rolling back to the older cert now, but since the registry is distributed by a global CDN this process is slower than we’d like, and we don’t want to break things (further) by rushing the process.
Is it safe to install it?
From the blog:
ca = "" seems dangerous!
It’s not. All the fix does is tell npm to stop using the bundled CA and use the CA built-in to your copy of Node. It is actually more secure than what we were doing previously, which is part of why we did it.
If everything is updated on your side like npm, node.js etc. The installation may be blocked by some other platform/proxy… I may suggest you also post this question on npm related forums to double confirm this and see if there are some better solutions.
Have a nice day.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.