Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peer dependency issue: @docusaurus/plugin-ideal-image throws a warning at install if react-19 is used #11000

Open
6 of 7 tasks
fattila16 opened this issue Mar 17, 2025 · 1 comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution

Comments

@fattila16
Copy link

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and 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: [email protected]
npm warn node_modules/react
npm warn   peer react@"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn   node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn     react-waypoint@"^10.3.0" from @docusaurus/[email protected]
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

  1. npx create-docusaurus@latest my-website classic --typescript
  2. npm 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: [email protected]
npm warn Found: [email protected]
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 [email protected]
npm warn node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn   react-waypoint@"^10.3.0" from @docusaurus/[email protected]
npm warn   node_modules/@docusaurus/plugin-ideal-image
npm warn   1 more (@slorber/react-ideal-image)
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/react
npm warn   peer react@"^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" from [email protected]
npm warn   node_modules/@docusaurus/plugin-ideal-image/node_modules/react-waypoint
npm warn     react-waypoint@"^10.3.0" from @docusaurus/[email protected]
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 vulnerabilities

Your 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.
@fattila16 fattila16 added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Mar 17, 2025
@slorber slorber removed the status: needs triage This issue has not been triaged by maintainers label Mar 17, 2025
@slorber
Copy link
Collaborator

slorber commented Mar 17, 2025

Thanks for reporting, I'll study how to fix this, probably removing unmaintained react-waypoint usage in our fork here: https://github.com/slorber/docusaurus-react-ideal-image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution
Projects
None yet
Development

No branches or pull requests

2 participants