Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm-api does not respect .npmrc files #12

Open
mpiroc opened this issue May 9, 2020 · 4 comments
Open

npm-api does not respect .npmrc files #12

mpiroc opened this issue May 9, 2020 · 4 comments

Comments

@mpiroc
Copy link

mpiroc commented May 9, 2020

It's common to install packages from multiple registries. For example, an organization may wish to install packages from @my-org from their own registry, while still using the official npm registry for other packages.

You can achieve this with a line in your .npmrc that looks something like this:

@my-org:registry=https://npm.pkg.github.com

With npm-api, the registry is hard-coded in lib/config.js. It does not look at .npmrc, and does not provide a way to manually override the registry location/add a second location.

@mpiroc
Copy link
Author

mpiroc commented May 9, 2020

Also note that for private registries, the auth tokens are also specified in .npmrc.

@markcellus
Copy link

Ha, thanks for filing this. Just stumbled upon this repository and it was the very first question I had. If it doesn't look at npmrc file contents, what does it use? 😳

@markcellus
Copy link

markcellus commented Jan 27, 2021

FWIW, I just came across https://www.npmjs.com/package/npm-registry-fetch which seems to fulfill the need. nevermind. It doesn't respect npmrc files.

@ChrizzDF
Copy link

We would also need this feature 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants