react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

react-lazy-images peer dependency conflicts for react-18

Open kashifshaikh opened this issue 2 years ago • 1 comments
trafficstars

Description

When installing react-notion-x, once of it's dependencies react-lazy-images gets conflicts with react-18 (for nextjs-13)

I fixed this in package.json by adding an override to force peer dependency for now:

 "overrides": {
    "react-notion-x": {
      "react": "^18.2.0",
      "react-dom": "^18.2.0"
    }
  }

These are the errors I get

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   19 more (@headlessui/react, @heroicons/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15 || ^16" from [email protected]
npm WARN node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN   react-lazy-images@"^1.1.0" from [email protected]
npm WARN   node_modules/react-notion-x
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^15 || ^16" from [email protected]
npm WARN   node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN     react-lazy-images@"^1.1.0" from [email protected]
npm WARN     node_modules/react-notion-x
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   19 more (@headlessui/react, @heroicons/react, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer react@"^15.0.0 || ^16.0.0 || ^17.0.0" from [email protected]
npm WARN node_modules/react-notion-x/node_modules/react-lazy-images/node_modules/react-intersection-observer
npm WARN   react-intersection-observer@"^6.1.0" from [email protected]
npm WARN   node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN 
npm WARN Conflicting peer dependency: [email protected]
npm WARN node_modules/react
npm WARN   peer react@"^15.0.0 || ^16.0.0 || ^17.0.0" from [email protected]
npm WARN   node_modules/react-notion-x/node_modules/react-lazy-images/node_modules/react-intersection-observer
npm WARN     react-intersection-observer@"^6.1.0" from [email protected]
npm WARN     node_modules/react-notion-x/node_modules/react-lazy-images

When I goto react-lazy-images, it seems author updated the peer dependencies to react-18 and bumped up react-intersection-observer to latest one which (which supports react-18) 4 months ago, however the author hasn't released/published the newer npm yet.

kashifshaikh avatar Feb 19 '23 03:02 kashifshaikh

I have encountered the same issue Can someone update this dep?

predam avatar Jul 17 '23 17:07 predam