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

peerDependencies not resolving properly #7932

Closed
Didas-git opened this issue Dec 31, 2023 · 4 comments · Fixed by #8038
Closed

peerDependencies not resolving properly #7932

Didas-git opened this issue Dec 31, 2023 · 4 comments · Fixed by #8038
Labels
bug Something isn't working bun install Something that relates to the npm-compatible client

Comments

@Didas-git
Copy link
Contributor

What version of Bun is running?

1.0.20+09d51486e

What platform is your computer?

Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

Install a a package that requires a peerDependency to work, also install said peerDependency.
Afterwards, try to update the peerDependency.

If you are using typescript you will find lots of type collisions because of missmatched versions, if you observe further you will see that bun has installed 2 versions of the dependency instead of just having the one you updated

What is the expected behavior?

I expect bun to just have 1 version of the dependency

What do you see instead?

Bun installs multiple versions

Additional information

No response

@Didas-git Didas-git added the bug Something isn't working label Dec 31, 2023
@Jarred-Sumner
Copy link
Collaborator

Can you provide a more complete reproduction?

@Didas-git
Copy link
Contributor Author

This is the most recent repro i can remember.
Clone: https://github.com/xHyroM/bun-discord-bot/tree/62e52832e72dd04b81960a9c48395a4cdf87762d
Update dependencies (in this case lilybird which is a peerDependency for 2 other packages) and typescript will complain about missmatched versions, looking further seems like the packages that have this dependency as a peerDependency have their own node_modules with the previous version even tho their version ranges include patches

@Electroid Electroid added the bun install Something that relates to the npm-compatible client label Jan 1, 2024
@quantizor
Copy link

Possibly related #7869

@7f8ddd
Copy link
Contributor

7f8ddd commented Jan 2, 2024

I can attest to this being an issue while using Elysia. I have to delete Elysia from the Elysia plugin's node_modules and re-install it to fix it.

@eriklangille eriklangille mentioned this issue Jan 8, 2024
6 tasks
dylan-conway pushed a commit that referenced this issue Jan 12, 2024
* updating package with child peerDependency doesn't keep old version

* [autofix.ci] apply automated fixes

* fixed TODO test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
ryoppippi pushed a commit to ryoppippi/bun that referenced this issue Feb 1, 2024
* updating package with child peerDependency doesn't keep old version

* [autofix.ci] apply automated fixes

* fixed TODO test

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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

Successfully merging a pull request may close this issue.

5 participants