Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all registries npm would use?

Tags:

npm

I have a package in a private registry. I know it is there as I can pull it into some projects, but I can't pull it into one. I have the correct .npmrc one directory up but am still getting a 404 error.

Is there a way to check all registries that npm would use on install?

like image 243
George Mauer Avatar asked Sep 14 '18 03:09

George Mauer


1 Answers

You can show the registry of a specific package with the npm view command.

> npm view angular

[email protected] | MIT | deps: none | versions: 136
HTML enhanced for web apps
http://angularjs.org

keywords: angular, framework, browser, client-side

dist
.tarball: https://registry.npmjs.org/angular/-/angular-1.7.5.tgz
.shasum: d1c1c01c6f5dc835638f3f9aa51012857bdac49e
.integrity: sha512-760183yxtGzni740IBTieNuWLtPNAoMqvmC0Z62UoU0I3nqk+VJuO3JbQAXOyvo3Oy/ZsdNQwrSTh/B0OQZjNw==
.unpackedSize: 2.1 MB

maintainers:
- angular <[email protected]>
- angularcore <[email protected]>
- petebd <[email protected]>

dist-tags:
latest: 1.7.5         old: 1.2.32           previous_1_4: 1.4.14  previous_1_5: 1.5.11

published 4 weeks ago by petebd <[email protected]>

When you use npm config get registry you will see the default registry.

> npm config get registry

https://registry.npmjs.org/

With npm config list you can see custom configurations. When you have registered a registry for different scopes you will see them here

@polymer:registry=<url register A>
like image 194
NtFreX Avatar answered Oct 06 '22 08:10

NtFreX