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?]: The yarn dedupe command fails if there is esbuild package in the workspace package.json #6176

Open
1 task done
manoraj opened this issue Mar 20, 2024 · 1 comment · May be fixed by #6527
Open
1 task done
Labels
bug Something isn't working

Comments

@manoraj
Copy link

manoraj commented Mar 20, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

The yarn dedupe command fails with Error: Assertion failed: The package (--locatorHash--) should have been registered.

To reproduce

Create a small package.json with

"dependencies": { "@yarnpkg/builder": "^3.3.0", "esbuild": "^0.15.18" }

Run yarn and yarn dedupe.

Expected: The dedupe command should work.
Actual: The dedupe command fails with Error: Assertion failed: The package (--locatorHash--) should have been registered

Environment

System:
    OS: macOS 14.3.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.17.1 - /private/var/folders/x2/2sz9b9b9655ct3zqnwfhfpmh0000gn/T/xfs-e8030edc/node
    Yarn: 3.6.1
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.1/bin/npm
    bun: 1.0.2 - /opt/homebrew/bin/bun

Additional context

The command works if we remove the esbuild from the package.json. Looks like the npm alias @yarnpkg/builder has "esbuild": "npm:esbuild-wasm@^0.15.15" is causing this issue.

@manoraj manoraj added the bug Something isn't working label Mar 20, 2024
@BasixKOR
Copy link
Contributor

I was also experiencing this issue, and it seems like it only fails when user has actual stale resolution of esbuild, meaning this cannot be reliably reproduced unless user manually edits out the lockfile.

@BasixKOR BasixKOR linked a pull request Sep 26, 2024 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants