Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is url for npm packages repository?

Tags:

npm-install

I have installed node js and npm on my windows But when I try to install npm modules(packages) using

command>>npm install -g xxxx(package name)

It doesn't get installed, and it asked me to check proxy setting. As I am working on private network, so may be it doesn't allow me to access the url from which npm packages get downloaded.

Please tell me what is url for such npm packages from where it gets downloaded so that I can ask my network provider to give access for that site.

like image 988
Mohsin Tamboli Avatar asked Oct 18 '22 05:10

Mohsin Tamboli


1 Answers

NPM packages are downloaded from https://registry.npmjs.org unless otherwise configured.

You can get the download URL for a package with npm view, for example JQuery:

npm view jquery dist.tarball

returns: https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz

You can change the default registry with npm set registry <new url>; this is typically used in large institutions or corporations with an internal registry mirror.

like image 195
andrewpm Avatar answered Oct 21 '22 07:10

andrewpm