Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

fix: pass the scope option to pacote for auth purposes #8

Closed
wants to merge 1 commit into from

Conversation

nlf
Copy link

@nlf nlf commented Apr 1, 2021

without the scope, the tarball url is passed through npm-package-arg which is expected to be able to identify a scope. since the url does not follow the standard npm registry url patterns, the scope is not identified and so we do not apply the correct registry-specific auth header.

this change makes it so the scope from the original package identifier is passed through to pacote, ensuring that the correct registry and auth header are identified.

References

Fixes npm/cli#2918

@wraithgar wraithgar self-requested a review April 1, 2021 19:25
@ablackrose
Copy link

Is there an ETA for this to get merged and released? npm v6 is no longer active and we can't move to v7 until this fix is released.

@wraithgar
Copy link
Member

@ablackrose thanks for the reminder. This seems to have slipped through the cracks.

@nlf
Copy link
Author

nlf commented Jun 23, 2021

@ablackrose this pull request is actually going to be closed as the implementation here we concluded wasn't the right place for it. instead, we did a pretty significant refactor of how auth is handled in npm-registry-fetch and published it as part of npm@7.11.1. we're currently at 7.18.1, which includes even more bug fixes.

can you please try updating to the latest version of npm 7 and seeing if you still have an issue? if you do, open a new issue at https://github.com/npm/cli and we can help figure out exactly what's going on. as much information as you can give us to reproduce the problem you're seeing is the fastest way to help us figure out a fix. thanks!

@nlf nlf closed this Jun 23, 2021
@ablackrose
Copy link

Yes, thanks for the work, the issue appears to be resolved in 7.18.1.

@wraithgar wraithgar deleted the nlf/pass-scope-to-pacote branch September 21, 2021 16:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] npm pack fails for scoped package from private registry when it's not in the cache
3 participants