Had the same error. Looks like it is related to SSL certificates. If you are using NPM for public packages (don't need the security of HTTPS) you can turn off strict SSL key validation with the following command.
This might be the simplest fix if you're just looking to install a few publicly available packages one time.
npm config set strict-ssl=false