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

[Bug?]: @typescript/lib-dom dependency from yarn 1 lock file not properly migrated #5724

Open
1 task
bt-nia opened this issue Sep 11, 2023 · 0 comments
Open
1 task
Labels
bug Something isn't working

Comments

@bt-nia
Copy link

bt-nia commented Sep 11, 2023

Self-service

  • I'd be willing to implement a fix

Describe the bug

The following dependency does not get migrated correctly when running a yarn install:

"@typescript/lib-dom@npm:@types/web":
  version "0.0.61"
  resolved "https://registry.yarnpkg.com/@types/web/-/web-0.0.61.tgz#29bb8951e17b7597084c7a4cccd5072711b0ac09"
  integrity sha512-lQ4M3OSh8eFj55fz1RJsLhCubET/7duOXoKcxVaUXYXyxikD9BA+WWrqAn5CjJxrc82b7zFY4OCVIeVdkPLaGg==

During the process, yarn will try to migrate but fail because of the wrong URL:

$ yarn install --immutable
➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker 👍
➤ YN0000: ┌ Resolution step
Resolution step
➤ YN0035: @typescript/lib-dom@npm:@types/web: The remote server failed to provide the requested resource
➤ YN0035:   Response Code: 404 (Not Found)
➤ YN0035:   Request Method: GET
➤ YN0035:   Request URL: https://registry.yarnpkg.com/@typescript%2flib-dom
➤ YN0000: └ Completed in 51s 800ms
➤ YN0000: Failed with errors in 51s 805ms

I assume this is related to the issue #5085 so I attempted to transform the URL manually (similar to here), but I'm not sure how it has to look like.
Manually converting the entry to for example this:

"@typescript/lib-dom@types/web":
  version "0.0.61"
  resolved "@typescript/lib-dom@types/web@npm:0.0.61::__archiveUrl=https%3A%2F%2Fregistry%2Eyarnpkg%2Ecom%2F%40types%2Fweb%2F%2D%2Fweb%2D0%2E0%2E61%2Etgz"
  integrity sha512-lQ4M3OSh8eFj55fz1RJsLhCubET/7duOXoKcxVaUXYXyxikD9BA+WWrqAn5CjJxrc82b7zFY4OCVIeVdkPLaGg==

Does not fix the issue unfortunately. I'm receiving the unsupported resolver error. I tried different combinations of version/package name with and without :npm in the name, etc. Then again, this was fairly random - I'm quite unfamiliar with the format.

To reproduce

echo '"@typescript/lib-dom@npm:@types/web":
version "0.0.61"
resolved "https://registry.yarnpkg.com/@types/web/-/web-0.0.61.tgz#29bb8951e17b7597084c7a4cccd5072711b0ac09"
integrity sha512-lQ4M3OSh8eFj55fz1RJsLhCubET/7duOXoKcxVaUXYXyxikD9BA+WWrqAn5CjJxrc82b7zFY4OCVIeVdkPLaGg==' > yarn.lock; yarn set version stable; yarn install --immutable

Environment

$ yarn dlx -q envinfo --preset jest
  System:
    OS: Linux 5.15 Alpine Linux
    CPU: (8) x64 Intel(R) Xeon(R) CPU @ 2.80GHz
  Binaries:
    Node: 14.21.3 - /tmp/xfs-65131a28/node
    Yarn: 3.6.3 - /tmp/xfs-65131a28/yarn
    npm: 6.14.18 - /usr/local/bin/npm

Additional context

This is how the entry is supposed to look like when created with yarn3:

"@types/web@npm:^0.0.114":
  version: 0.0.114
  resolution: "@types/web@npm:0.0.114"
  checksum: d8a72144dd7c9ada7d6a4558b37f14291cf16b0ba2b3254753cfe32cc1875fe718a6cfd37c567ff589460e3e68d3b7a588de4551fab5c31d1458e4af2f9c2376
  languageName: node
  linkType: hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant