Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install without ssl

Tags:

node.js

npm

ssl

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?

like image 607
Ken Hirakawa Avatar asked Jan 15 '12 23:01

Ken Hirakawa


People also ask

How do I turn off strict SSL?

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.

Can you npm install without internet?

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.

Can you install npm without root?

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.

Can I install npm without node JS?

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.


1 Answers

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/ 
like image 103
colinf Avatar answered Sep 23 '22 00:09

colinf