-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
With a fresh install of the latest docusaurus 3.7.0 and using the official plugin @docusaurus/plugin-ideal-image, after you've ran npm install the following warnings are thrown:
npm warn Conflicting peer dependency: react@18.3.1
npm warn node_modules/react
npm warn peer react@"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from react-waypoint@10.3.0
npm warn node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn react-waypoint@"^10.3.0" from @docusaurus/plugin-ideal-image@3.7.0
npm warn node_modules/@docusaurus/plugin-ideal-image
npm warn 1 more (@slorber/react-ideal-image)
What's the reason?
This plugin is depending on the slorber/react-ideal-image repository which depends on react-waypoint which as of my current knowledge does not support react 19 yet.
Currently I don't see an obvious solution to this as react-waypoint is not that active regarding contribution.
Possibly it should be switched to https://www.npmjs.com/package/react-intersection-observer which does support react 19 and can be used to achieve a similar functionality as react-waypoint is used. The latter uses scroll event listeners the prior uses the Intersection Observer API.
Reproducible demo
No response
Steps to reproduce
npx create-docusaurus@latest my-website classic --typescriptnpm install --save @docusaurus/plugin-ideal-image
Expected behavior
A fresh setup of docusaurus and the ideal image plugin should not throw peer dependency issues
Actual behavior
npm i
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: react-waypoint@10.3.0
npm warn Found: react@19.0.0
npm warn node_modules/react
npm warn react@"^19.0.0" from the root project
npm warn 32 more (@docsearch/react, @docusaurus/core, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer react@"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from react-waypoint@10.3.0
npm warn node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn react-waypoint@"^10.3.0" from @docusaurus/plugin-ideal-image@3.7.0
npm warn node_modules/@docusaurus/plugin-ideal-image
npm warn 1 more (@slorber/react-ideal-image)
npm warn
npm warn Conflicting peer dependency: react@18.3.1
npm warn node_modules/react
npm warn peer react@"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from react-waypoint@10.3.0
npm warn node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn react-waypoint@"^10.3.0" from @docusaurus/plugin-ideal-image@3.7.0
npm warn node_modules/@docusaurus/plugin-ideal-image
npm warn 1 more (@slorber/react-ideal-image)
added 1 package, removed 1 package, and audited 2317 packages in 3s
588 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilitiesYour environment
- Docusaurus version used: 3.7.0
- Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 22.14.0
- Operating system and version (e.g. Ubuntu 20.04.2 LTS): macOS 15.3.2
Self-service
- I'd be willing to fix this bug myself.