Skip to content

Compatibility Issue with React 19 Release Candidate #1240

@ramayudanto

Description

@ramayudanto

I ran into an issue when trying to install @heroicons/react with the React 19 release candidate (19.0.0-rc-69d4b800-20241021). The installation fails due to a dependency conflict because @heroicons/react currently supports React versions >= 16, which doesn’t appear to include compatibility with React 19.

Error Details

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"19.0.0-rc-69d4b800-20241021" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@">= 16" from @heroicons/[email protected]
npm ERR! node_modules/@heroicons/react
npm ERR!   @heroicons/react@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Steps to Reproduce

  1. Start a new Next.js project with React 19 (e.g., npx create-next-app@latest).
  2. Attempt to install @heroicons/react:
    npm install @heroicons/react
  3. The error appears due to the dependency conflict.

Environment:

  • @heroicons/react version: 2.1.5
  • React version: 19.0.0-rc-69d4b800-20241021
  • Node version: 20.10.0
  • npm version: 10.2.3

Workarounds I Found:

  1. Downgrade React to version 18.

Request:
Any chance you could add support for the React 19 release candidates? It would make it easier for others exploring the latest React updates to use Heroicons!

Thanks so much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions