silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
167 stars 17 forks source link

React v18 and warning about an unmet dependency with react-aria-menubutton #1531

Closed PeterC-DLS closed 6 months ago

PeterC-DLS commented 7 months ago

Consuming @h5web/lib v10 and installing with pnpm:

WARN  Issues with peer dependencies found
client/component
└─┬ @h5web/lib 10.0.0
  └─┬ react-aria-menubutton 7.0.3
    └── ✕ unmet peer react@"^16.3.0 || ^17.0.0": found 18.2.0

It seems like there's an upstream issue: react-aria-menubutton:#156

axelboc commented 6 months ago

Yeah, sorry for not documenting this anywhere. You can safely ignore the warning or silence it, for instance with the following config in package.json if you use pnpm:

"pnpm": {
  "peerDependencyRules": {
    "allowedVersions": {
      "react-aria-menubutton>react": "18.x"
    }
  }
}
PeterC-DLS commented 6 months ago

Thanks, this works if I add it to the top-level package.json of a monorepo.