I have an Ubuntu VM that is having trouble connecting to sites with ssl, i.e. https. It can successfully download artifacts from the internet if the url begins with http.
npm install will download dependencies via https. Is there anyway make it download via http?
Most of these tools have an option to disable strict SSL certificate checking, which let you get around the problem: npm config strict-ssl false. git config --global http. sslverify false.
The method described here is to package the dependencies into a tar file, then on the isolated environment, one can use the npm install <your tar file> command to install dependencies file without internet connection.
npm installs packages locally within your projects by default. You can also install packages globally (e.g. npm install -g <package> ) (useful for command-line apps). However the downside of this is that you need to be root (or use sudo ) to be able to install globally.
To publish and install packages to and from the public npm registry or a private npm registry, you must install Node. js and the npm command line interface using either a Node version manager or a Node installer.
Try changing the registry to the http version rather that the default https one using the command
npm config set registry http://registry.npmjs.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With