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

Package install "renaming" doesn't work with Bun install #4899

Open
byCedric opened this issue Sep 11, 2023 · 1 comment
Open

Package install "renaming" doesn't work with Bun install #4899

byCedric opened this issue Sep 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@byCedric
Copy link

byCedric commented Sep 11, 2023

What version of Bun is running?

1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983

What platform is your computer?

Darwin 22.6.0 arm64 arm

What steps can reproduce the bug?

The full description of the issue can be found here: isaacs/jackspeak#5 (comment)

TL;DR; With npm, you can use different values other than a semver range in your package.json for your dependencies. That includes prefixes such as github:<owner>/<repo>, file:<path-to-workspace>, or even npm:<some-package>@<semver-range>. This kind of works already, with the exception of "renaming".

When you install the @isaacs/cliui@8.0.2 package, that uses the code below as dependencies, Bun seems to fail without fully breaking.

{
  "dependencies": {
    "string-width": "^5.1.2",
    "string-width-cjs": "npm:string-width@^4.2.0",
    "strip-ansi": "^7.0.1",
    "strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
    "wrap-ansi": "^8.1.0",
    "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
  }
}

What is the expected behavior?

Bun should install string-width@5.1.2 as node_modules/string-width and string-width@4.2.0 as node_modules/string-width-cjs.

What do you see instead?

Bun outputs error: PathAlreadyExists installing string-width in this case.

image

(source: https://github.com/expo/vscode-expo/actions/runs/6138072599/job/16654576302#step:3:51)

Additional information

The full description of the issue can be found here: isaacs/jackspeak#5 (comment)

@byCedric byCedric added the bug Something isn't working label Sep 11, 2023
@byCedric byCedric changed the title Package install "renaming" doesn't work with Bun Package install "renaming" doesn't work with Bun install Sep 11, 2023
@Jarred-Sumner
Copy link
Collaborator

@dylan-conway this was fixed in v1.1.6 right?

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

2 participants