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: React-markdown not compatible with Next.js 15 (React 19 RC) #871

Closed
4 tasks done
justrach opened this issue Oct 30, 2024 · 4 comments
Closed
4 tasks done
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@justrach
Copy link

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

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Oct 30, 2024
@ChristianMurphy
Copy link
Member

@justrach it is compatible, React 18 is still supported by next.js

In version 15, the App Router uses React 19 RC, and we've also introduced backwards compatibility for React 18 with the Pages Router based on community feedback. If you're using the Pages Router, this allows you to upgrade to React 19 when ready.

https://nextjs.org/blog/next-15#react-19

@ChristianMurphy
Copy link
Member

React 19 support will be considered here when it is GA.

@ChristianMurphy ChristianMurphy added the 🙋 no/question This does not need any changes label Oct 30, 2024
@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Oct 30, 2024
@j2ghz
Copy link

j2ghz commented Nov 9, 2024

@justrach it is compatible, React 18 is still supported by next.js

In version 15, the App Router uses React 19 RC, and we've also introduced backwards compatibility for React 18 with the Pages Router based on community feedback. If you're using the Pages Router, this allows you to upgrade to React 19 when ready.

https://nextjs.org/blog/next-15#react-19

@ChristianMurphy That is not the case for the App router (the main/default way of using nextjs). As it says in the quote, React 18 is only supported in the Pages router.

@ChristianMurphy
Copy link
Member

@j2ghz you can nudge the next team to maintain support in app router as well.

For react-markdown

React 19 support will be considered here when it is GA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

3 participants