Skip to main content

The Fix: npm ERR! code SELF_SIGNED_CERT_IN_CHAIN [SOLVED]

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN

npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN

npm ERR! request to https://registry.npmjs.org/gulp-cli failed, reason: self signed certificate in certificate chain

What does it even mean? How does one fix this? There are so much information, it's hard to parse what I'm supposed to do.

The Solution: Disable the Company VPN

This is not ideal and you should work in cooperation with your IT security operations to let them know what you are doing and why you need it.

It was reading this article: https://stackoverflow.com/questions/54611707/request-to-https-registry-npmjs-org-co-failed and the comments that finally clued me into our VPN causing the conflict. I previously did not have any issues but our company hired a new CISO who has been very active in hardening our corporate environment.

What didn't work:

  • gulp untrust-dev-cert
  • Removing package-lock.json file
  • Reinstall Node.js

What I wasn't going to try (and you shouldn't either):

  • npm config set strict-ssl false
SSL establishes a trust between you and the source. If you want to turn off that trust, you risk compromising your system to malware and attack by an impersonator taking advantage of that lack of trust. Don't do it.

Comments

Popular posts from this blog

How to Create and Use a SharePoint App Registration

SharePoint App Registrations are incredibly useful for unattended tasks to read or update SharePoint sites. It's similar to a user service account but more secure. They cannot be used as a user sign-in. They are used in custom applications or automated scripted processes. They are made even more secure with a certificate, in which case, they may only run from the machine that owns the certificate. SharePoint Things to Do with App Registrations Read data and write the data to another process Write CSV, text, or XML files Useful for data for to import into report software Writing the data to other APIs such as ERPs, Project software, or work authorization systems Changing the data Check the data based on a schedule. Update the data based on constraints Change permissions of items in a SharePoint list once an item is past due Work with partners and vendors to provide just-in-time, specific access to necessary data Simple Process Create the application either in SharePoint or in App Re...

PowerApps Productivity Timer

I like to track activities . I have several workout apps and a Fitbit . Measuring things allows us to monitor our performance and journal our success. But not all activities have ready-made, easy to use apps - a problem measuring things that don’t fit into popular categories. Early in my IT career I was an IT procurement specialist for a large enterprise. Procurement specialists process 20-60 requisitions a day. It’s a lot of paperwork (even with a digital process.) I oversaw making it more digital and less paper based. I succeeded in reducing a typical requisition from 8 minutes to 2 minutes. The process allowed procurement to reduce person hours by almost a whole position. I’ve always said that computers allow us to do more and there was always more to do. Being able to measure that efficiency improvement is the impetus for having an easy-to-use timer. I have learned many times over the years that productivity is lost or gained in the moments between activities. I waste a lot...