Skip to content

plugin-debug can't be compatible with React 19 due to dependency on old react-json-view-lite #10817

@tats-u

Description

@tats-u

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

react-json-view-lite used in plugin-debug has not been compatible with React 19 in its peerDependencies.
To make matter worse plugin-debug does not use the latest version of it.

Reproducible demo

  1. https://docusaurus.new/codesandbox-ts
  2. Remove node_modules
  3. yarn install

Steps to reproduce

  1. Update React (react, react-dom, and @types/react) to 19
  2. npm, yarn, or pnpm install if not done

Expected behavior

No warnings or errors

Actual behavior

Warning (or error) complaining about unmet peer dependencies on React

e.g. Yarn (Official CodeSandBox):

warning "@docusaurus/preset-classic > @docusaurus/plugin-debug > [email protected]" has incorrect peer dependency "react@^16.13.1 || ^17.0.0 || ^18.0.0".

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: 3.7.0
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node 22.12
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows 11

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions