npm install not working anymore with self signed certificate in certificate chain

Viewed 24

I'm on windows 10

Just recently, when I tried to update my npm chromedriver package I started running into issues so I deleted my node_modules/ folder and tried to npm install fresh and I get a "self signed certificate in certificate chain" error now

After doing many things from searching, I uninstalled node then re-installed it. (I tried the 18 version of it as well) and had much the same issues.

I'm on node -v of v16.17.0 and npm -v of 8.15.0

I tried to go to https://registry.npmjs.org and download the certificate and point my config to it with npm config set cafile C:/theFilePath but I still get the same issue when running npm install

then I tried to run npm set strict-ssl false to ignore it and still get the same issue.

I also ran npm config set ca="" as well as npm config set cafile null but still the same problem.

I have also tried to set the registry to http://registry.npmjs.org to go through http rather than https but still have the same issue.

What else should I do? This has wasted a lot of my time already to not be able to do a "simple" npm install. Maybe my company has something configured that is messing me up, but I don't know what to even ask at this point to fix the issue, its been fine in the past.

also when I ran yarn install I got back "an unexpected error occurred: https://registry.npmjs.org/express: self signed certificate in certificate chain" and I think it references express because that is one of the packages to be installed in my package.json file

Edit:

Maybe this is an issue with just the geckodriver npm package

Today I tried running yarn config set "strict-ssl" false and removed all my npm packages and installed each one, one by one and got the project working mostly. the geckodriver is the last package I was unable to install with yarn install after changing the strict-ssl setting. It failes on [4/4] Building fresh packages... and gives the "self signed certificate in certificate chain" error

Also if I set yarn config set "strict-ssl" true and run yarn install I get "error Couldn't find package "fsevents@~2.3.2" required by "chokidar@3.5.3" on the "npm" registry." even without the geckodriver npm package is my package.json file

0 Answers
Related