npm-api
npm-api copied to clipboard
npm-api does not respect `.npmrc` files
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.
Also note that for private registries, the auth tokens are also specified in .npmrc
.
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? 😳
~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.
We would also need this feature 🙈