Skip to content

Peer Dependency Issue: React-markdown not compatible with Next.js 15 (React 19 RC) #871

@justrach

Description

@justrach

Initial checklist

Affected packages and versions

eact-markdown: 9.0.1 react: 19.0.0-rc-69d4b800-20241021 next: 15

Link to runnable example

No response

Steps to reproduce

Create minimal reproduction

npx create-next-app@latest my-app --use-npm
cd my-app
npm install react-markdown

Steps to reproduce

Create a new Next.js 15 project
Try to install react-markdown
Observe the following error:

npm error While resolving: psych_frontend@0.1.0
npm error Found: react@19.0.0-rc-69d4b800-20241021
npm error node_modules/react
npm error react@"19.0.0-rc-69d4b800-20241021" from the root project

npm error Could not resolve dependency:
npm error peer react@">=18" from react-markdown@9.0.1
npm error node_modules/react-markdown
npm error react-markdown@"^9.0.1" from the root project

Expected behavior

react-markdown should install successfully with React 19 RC, as it's a newer version than the specified peer dependency requirement of >=18.

Actual behavior

Installation fails due to peer dependency constraints not recognizing React 19 RC as a valid version.

Affected runtime and version

Node: 20.11.0 npm: 10.2.4

Affected package manager and version

No response

Affected OS and version

No response

Build and bundle tools

Vite, Next.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙋 no/questionThis does not need any changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions