Registry scoping for NPM packages that are not scoped on the target registry

Viewed 15

I am looking to use multiple registries in a project. I need to target multiple registries, which lead me to scoping. I would like to access package-a from registry-a and package-b from registry-b among numerous other packages that come from npm (default registry). In .npmrc,

@first=registry=https://registry-a.org/registry/
@second=registry=https://registry-b.org/registry/
registry=https://www.npmjs.com

When attempting to run npm install @first/package-a it results in an error. When analyzing this I can see that the URL itself has the scope before the package name. The result looks like:

npm ERR! 404 Not Found - GET http://registry-a.org/registry/@first%2fpackage-a - Not found

Neither of these packages have been published with the scope. Is there a way around this?

0 Answers
Related