bun icon indicating copy to clipboard operation
bun copied to clipboard

bun does not recognize peer dependency conflicts

Open andreasvh-conceto opened this issue 1 year ago • 17 comments

What version of Bun is running?

1.0.29+a146856d1

What platform is your computer?

Darwin 23.2.0 arm64 arm

What steps can reproduce the bug?

  1. checkout the repository [email protected]:andreasvh-conceto/bun-conflicting-peer-dependency.git
  2. run bun install && rm -Rf node_modules && npm i
  3. bun will not complain about dependency conflicts , npm does

What is the expected behavior?

bun will recognize the peer dependency conflicts like npm does with:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^5.0.11" from the root project
npm ERR!   peer vite@"^5.0.0" from @vitejs/[email protected]
npm ERR!   node_modules/@vitejs/plugin-vue
npm ERR!     dev @vitejs/plugin-vue@"^5.0.3" from the root project
npm ERR!   2 more (vite-node, vitest)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.7.0 || ^3.0.0 || ^4.0.0" from [email protected]
npm ERR! node_modules/vite-plugin-vuetify
npm ERR!   dev vite-plugin-vuetify@"^1.0.0-alpha.12" from the root project
npm ERR!   peerOptional vite-plugin-vuetify@"^1.0.0-alpha.12" from [email protected]
npm ERR!   node_modules/vuetify
npm ERR!     vuetify@"npm:@vuetify/nightly@next" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vite
npm ERR!   peer vite@"^2.7.0 || ^3.0.0 || ^4.0.0" from [email protected]
npm ERR!   node_modules/vite-plugin-vuetify
npm ERR!     dev vite-plugin-vuetify@"^1.0.0-alpha.12" from the root project
npm ERR!     peerOptional vite-plugin-vuetify@"^1.0.0-alpha.12" from [email protected]
npm ERR!     node_modules/vuetify
npm ERR!       vuetify@"npm:@vuetify/nightly@next" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /Users/<username>/.npm/_logs/2024-02-27T19_12_43_569Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/<username>/.npm/_logs/2024-02-27T19_12_43_569Z-debug-0.log

What do you see instead?

I get a successful response without any peer dependency conflict

rm -Rf node_modules && bun install                                                                                                                                                                                                                       ─╯
bun install v1.0.29 (a146856d)

 + @mdi/[email protected] (v7.4.47 available)
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + @rushstack/[email protected]
 + @tsconfig/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @types/[email protected]
 + @vitejs/[email protected]
 + @vue/[email protected] (v9.0.0 available)
 + @vue/[email protected]
 + @vue/[email protected]
 + @vue/[email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected]
 + [email protected] (v2.0.1 available)
 + [email protected]
 + [email protected]
 + [email protected]

 535 packages installed [3.17s]

Additional information

for our pipeline we use currently bun. But we figured out, that we have diverse dependency version conflicts, which only occur with npm. It looks like bun does not recognize them.

andreasvh-conceto avatar Feb 27 '24 19:02 andreasvh-conceto

Hi, are there any updates on this one @Electroid?

szarbartosz avatar Mar 19 '24 10:03 szarbartosz

Last known info: https://github.com/oven-sh/bun/issues/8406#issuecomment-1921173551

byCedric avatar Mar 20 '24 16:03 byCedric

@Jarred-Sumner Is this fixed in v1.1?

isaachinman avatar Apr 06 '24 11:04 isaachinman

Hi,

I'm on a Mac and facing the same issue. I have React v18, but a package has a peer dependency on React v16. It ignores the peer dependency.

bun install v1.1.4 (fbe2fe0c)
warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

warn: incorrect peer dependency "[email protected]"

alexbrayko avatar Apr 24 '24 09:04 alexbrayko

We are facing the exact same issue. Can I ask if there is any hope to get it fixed? The only alternative solution for us is to switch to npm which we are really avoiding (❤️ bun) @dylan-conway

mnurik avatar May 01 '24 19:05 mnurik

+1

caioedut avatar May 09 '24 00:05 caioedut

@dylan-conway , @Electroid and @Jarred-Sumner , Is there any plan or roadmap detailing when and what gets prioritized?

alexbrayko avatar May 14 '24 13:05 alexbrayko