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

Incorrect offline mirror filename calculation with scoped packages URLs on the taobao npm registry #7532

Open
Axure opened this issue Sep 6, 2019 · 1 comment · May be fixed by #7533
Open

Comments

@Axure
Copy link

Axure commented Sep 6, 2019

Do you want to request a feature or report a bug?

A bug.

What is the current behavior?

The taobao registry gives tarball urls for scoped packages in formats like https://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.7.2.tgz, which cannot be parsed by the current regex /\/(?:(@[^/]+)(?:\/|%2f))?[^/]+\/(?:-|_attachments)\/(?:@[^/]+\/)?([^/]+)$/. The result will thus fallback to prop-types-15.7.2.tgz which conflicts with the cache for the package prop-types. This will result in checksum mismatch.

If the current behavior is a bug, please provide the steps to reproduce.

See reproduce-taobao-offline-mirror-error

What is the expected behavior?

The cache files for these two packages should be named differently.

Please mention your node.js, yarn and operating system version.

node.js: v10.15.3
yarn: 1.18.0-0
operating system: macOS mojave 10.14.4 (18E227)

@jpli
Copy link

jpli commented Nov 8, 2019

Thank you for submitting this issue. The same issue also prevents me from installing react-router-dom and @types/react-router-dom with the same version tag from taobao npm registry.

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