HTTPS GitHub URLs in package.json with node:12 Docker
You are getting an error like this:
and/or you get this:
Solution - Part 1
For solving the first error you need to change the URLs in your npm package.json from "git://..." to "https://...".
OK. So far so good.
Then you might get this error on "npm install":
Assuming that you use something like
as the base image for your Docker image, the following is what you will need to do. Note that the node "buster" image is based on Debian Linux.
Solution - Part 2
Add the following to your Dockerfile (before the npm install step!):
"sudo" might not be necessary, in that case you can leave it away. There is even a shorter version in one line:
What it does is to update the list list of public root CA (certificate authorities) known to the system (but it's not a solution for private certificates!).
That should fix the error and make your Docker image building again!