kbar icon indicating copy to clipboard operation
kbar copied to clipboard

Dependency error with `react-virtual`

Open HamedMP opened this issue 1 year ago • 12 comments

I still get an error when I install packages based on react 18 even though #222. Do you have any ideas how to solve it?

npm i --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   react@"18.2.0" from the root project
npm WARN   29 more (@headlessui/react, @radix-ui/react-collection, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.6.3 || ^17.0.0" from [email protected]
npm WARN node_modules/kbar/node_modules/react-virtual
npm WARN   react-virtual@"^2.8.2" from [email protected]
npm WARN   node_modules/kbar
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.6.3 || ^17.0.0" from [email protected]
npm WARN   node_modules/kbar/node_modules/react-virtual
npm WARN     react-virtual@"^2.8.2" from [email protected]
npm WARN     node_modules/kbar
npm ERR! code ENOTEMPTY
npm ERR! syscall rename

HamedMP avatar Aug 18 '23 11:08 HamedMP

npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: [email protected]
npm WARN Found: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.8 || ^17.0 || ^18.0" from @radix-ui/[email protected]
npm WARN   node_modules/@radix-ui/react-compose-refs
npm WARN     @radix-ui/react-compose-refs@"1.0.1" from @radix-ui/[email protected]
npm WARN     node_modules/@radix-ui/react-slot
npm WARN   45 more (@radix-ui/react-context, @radix-ui/react-dialog, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer react@"^16.6.3 || ^17.0.0" from [email protected]
npm WARN node_modules/kbar/node_modules/react-virtual
npm WARN   react-virtual@"^2.8.2" from [email protected]
npm WARN   node_modules/kbar
npm WARN
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^16.6.3 || ^17.0.0" from [email protected]
npm WARN   node_modules/kbar/node_modules/react-virtual
npm WARN     react-virtual@"^2.8.2" from [email protected]
npm WARN     node_modules/kbar

Encountered the same error, I tried several attempts to override or npm-force-resolution but was not able to fix it.

As far as I know, there is no breaking effect towards the usage of kbar, but it would be nice to get rid of the warning messages

thienguen avatar Aug 25 '23 10:08 thienguen

with npm 9+ you can define dep overrides for a workaround:

package.json

  ...
  "overrides": {
    "react": "18.2.0"
  },

https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

danmindru avatar Oct 02 '23 12:10 danmindru

with npm 9+ you can define dep overrides for a workaround:

package.json

  ...
  "overrides": {
    "react": "18.2.0"
  },

https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

This works to get rid of the warning but sadly most my projects followed the LTS version of nodejs and npm. Thanks tho!

thienguen avatar Oct 02 '23 20:10 thienguen

Facing the same warning. Is there anything we can do to help fix this?

ahmadbilaldev avatar Dec 07 '23 11:12 ahmadbilaldev

I created #348 to fix this.

@ahmadbilaldev If you want to help, test that PR in your project and see if you can find any issues.

iFreilicht avatar Dec 10 '23 14:12 iFreilicht

Hey! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '24 22:04 stale[bot]

Bad bot. Issue persists, PR to fix it was opened already.

iFreilicht avatar Apr 11 '24 05:04 iFreilicht

Please if we can get this fixed. Thanks

SaadFarooq-Dev avatar Apr 15 '24 09:04 SaadFarooq-Dev

PLease maintain this and get this fixed

ketangupta34 avatar Apr 23 '24 16:04 ketangupta34

need some noise here!

ketangupta34 avatar Apr 23 '24 16:04 ketangupta34

Bump

SaadFarooq-Dev avatar May 01 '24 10:05 SaadFarooq-Dev

bump

sohaibgv avatar Jul 18 '24 12:07 sohaibgv