NotionX / NotionX/react-notion-x
react-lazy-images peer dependency conflicts for react-18
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
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: react-lazy-images@1.1.0
npm WARN Found: react@18.2.0
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 react-lazy-images@1.1.0
npm WARN node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN react-lazy-images@"^1.1.0" from react-notion-x@6.16.0
npm WARN node_modules/react-notion-x
npm WARN
npm WARN Conflicting peer dependency: react@16.14.0
npm WARN node_modules/react
npm WARN peer react@"^15 || ^16" from react-lazy-images@1.1.0
npm WARN node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN react-lazy-images@"^1.1.0" from react-notion-x@6.16.0
npm WARN node_modules/react-notion-x
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: react-intersection-observer@6.4.2
npm WARN Found: react@18.2.0
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 react-intersection-observer@6.4.2
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 react-lazy-images@1.1.0
npm WARN node_modules/react-notion-x/node_modules/react-lazy-images
npm WARN
npm WARN Conflicting peer dependency: react@17.0.2
npm WARN node_modules/react
npm WARN peer react@"^15.0.0 || ^16.0.0 || ^17.0.0" from react-intersection-observer@6.4.2
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 react-lazy-images@1.1.0
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with package.json and reproduce the installation using React 18 and Next.js 13. Check the react-notion-x dependency tree for react-lazy-images and react-intersection-observer; done means the installation no longer reports conflicting React peer dependencies without relying on the temporary override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100