timc1 / kbar

fast, portable, and extensible cmd+k interface for your site
https://kbar.vercel.app
MIT License
4.84k stars 185 forks source link

chore(dependencies): add React v18 support #222

Closed caiotracera closed 2 years ago

caiotracera commented 2 years ago

Adding react and react-dom ^18.0.0 as peerDependencies to avoid dependency conflicts.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
kbar ✅ Ready (Inspect) Visit Preview May 31, 2022 at 2:01PM (UTC)
timc1 commented 2 years ago

Thanks @caiotracera!

vadimdemedes commented 2 years ago

npm still reports errors, because kbar depends on the old react-virtual version which doesn't allow react@18.x in its peer dependencies → https://github.com/TanStack/virtual/blob/v2.10.4/package.json#L47.

HamedMP commented 1 year ago

I also still get an error when I install packages based on react 18. 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: react-virtual@2.10.4
npm WARN Found: react@18.2.0
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 react-virtual@2.10.4
npm WARN node_modules/kbar/node_modules/react-virtual
npm WARN   react-virtual@"^2.8.2" from kbar@0.1.0-beta.43
npm WARN   node_modules/kbar
npm WARN 
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN   peer react@"^16.6.3 || ^17.0.0" from react-virtual@2.10.4
npm WARN   node_modules/kbar/node_modules/react-virtual
npm WARN     react-virtual@"^2.8.2" from kbar@0.1.0-beta.43
npm WARN     node_modules/kbar
npm ERR! code ENOTEMPTY
npm ERR! syscall rename