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
astro add
does not respect scoped registry configurations
#10740
Comments
PR welcome here. |
In looking into this further, I noticed that I will work on a PR that replaces this with |
If possible, can you share an example of what happens right now and what's the expected behaviour. I'm trying to understand this better in a given use case. |
We have a private NPM registry that requires authentication. We are hosting an Astro Integration in it and want to enable using it with When doing I did some experiments in trying to make this work. The part about using a separate registry for the scope is trivial (just run |
Appreciate the prompt and detailed response. I totally understand it now. I'll have to try it out myself by creating my own private package and then try raising a PR. |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
astro add
does not work if the package being added is in a custom registry and that custom registry is configured for the package's scope only. Astro ignores the custom registry and reports that the package does not exist.What's the expected result?
astro add
will query the NPM config for the registry usingnpm config get registry
.When a scoped package is being added, such as
@example/astro-integration
this is incorrect, as it ignores any registry that is configured for that scope only. Instead in case of a scoped package Astro should first querynpm config get @example:registry
and only if that returnsundefined
fall back tonpm config get registry
.Link to Minimal Reproducible Example
n/a
Participation
The text was updated successfully, but these errors were encountered: