clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
12.75k stars 634 forks source link

React 18 - @dnd-kit/accessibility #988

Open Skaidon opened 1 year ago

Skaidon commented 1 year ago

Recent release added React 18 support for some of the packages, but not @dnd-kit/accessibility.

npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR!   react@"18.2.0" from the root project
npm ERR!   peer react@">=16.8.0" from @dnd-kit/accessibility@3.0.1
npm ERR!   node_modules/@dnd-kit/accessibility
npm ERR!     @dnd-kit/accessibility@"^3.0.0" from @dnd-kit/core@6.0.7
npm ERR!     node_modules/@dnd-kit/core
npm ERR!       @dnd-kit/core@"6.0.7" from the root project
npm ERR!       2 more (@dnd-kit/modifiers, @dnd-kit/sortable)
npm ERR!   100 more (@dnd-kit/core, @dnd-kit/modifiers, @dnd-kit/sortable, ...)
PabloLerma commented 9 months ago

We fixed it overriding the dependency with npm: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides

It's a hack but at least you can fix it without relying on --force or --legacy-peer-deps.