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

bun install cannot resolve some dependencies #9954

Open
khalibloo opened this issue Apr 4, 2024 · 4 comments
Open

bun install cannot resolve some dependencies #9954

khalibloo opened this issue Apr 4, 2024 · 4 comments
Assignees
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client

Comments

@khalibloo
Copy link

What version of Bun is running?

1.1.1

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

  1. Run bun install tiny-cognito

What is the expected behavior?

It should resolve tiny-cognito's dependencies. This works fine on linux (tested on KDE neon), but not on Windows.

What do you see instead?

bun install v1.1.1 (ca1dbb4e)
warn: incorrect peer dependency "next@14.0.1"

error: No version matching "^0.1.0" found for specifier "@aws-sdk/types" (but package exists)

error: No version matching "^0.1.0" found for specifier "@aws-sdk/util-utf8-browser" (but package exists)

error: No version matching "^0.1.0" found for specifier "@aws-sdk/types" (but package exists)

error: No version matching "^0.1.0" found for specifier "@aws-sdk/util-utf8-browser" (but package exists)

error: No version matching "^0.1.0" found for specifier "@aws-sdk/util-locate-window" (but package exists)

Additional information

No response

@khalibloo khalibloo added the bug Something isn't working label Apr 4, 2024
@Electroid Electroid added the bun install Something that relates to the npm-compatible client label Apr 8, 2024
@Electroid
Copy link
Contributor

This also occurs on macOS.

@dylan-conway dylan-conway self-assigned this May 25, 2024
@dylan-conway
Copy link
Collaborator

Looks like we need to update our version picking logic to match closer to what npm has https://github.com/npm/cli/blob/7d89b55341160459e0fcd3374c3720d758b16339/node_modules/npm-pick-manifest/lib/index.js#L152

Mostly we need to account for deprecated versions and potentially choose other versions over them. In this situation, 0.1.0 is chosen for @aws-crypto/sha256-js@^0.1.0-preview.4 instead of 0.1.0-preview.4. 0.1.0 is a deprecated version with transitive dependencies that don't exist.

@Jex-y
Copy link

Jex-y commented Jul 1, 2024

I have a similar issue on Ubuntu 24.04 installing the firebase package. Works fine with NPM / Yarn but with Bun I get No version matching "0.8.2" found for specifier "@firebase/analytics-types" (but package exists). NPM website shows that 0.8.2 does exist.

Steps to reproduce:

bun init
bun add firebase
> bun add v1.1.17 (bb66bba1)
> error: No version matching "0.8.2" found for specifier "@firebase/analytics-types" (but  package exists)
> error: @firebase/analytics-types@0.8.2 failed to resolve

@dylan-conway
Copy link
Collaborator

@Jex-y are you able to repro this consistently? Also can you try with bun v1.1.18?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client
Projects
None yet
Development

No branches or pull requests

4 participants