#help

1 messages · Page 1 of 1 (latest)

frail torrentBOT
#

Hi @agile karma. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

This issue is related to a dependency conflict in Next.js 15 projects using React 19 RC (Release Candidate). The problem occurs because Next.js 15 uses a pre-release version of React 19, which is not compatible with many third-party packages that expect React 16, 17, or 18.

There are a few workarounds you can try:

  1. Use the --legacy-peer-deps flag when installing packages:

    npm install --legacy-peer-deps
    

    However, this may lead to potential issues as noted in Github Issue #72026 (https://github.com/vercel/next.js/issues/72026).

  2. Add an override in your package.json file:

    "overrides": {
      "react": "$react",
      "react-dom": "$react-dom"
    }
    

    This solution was suggested in Github Issue #72026 (https://github.com/vercel/next.js/issues/72026) and might be safer than using --force or --legacy-peer-deps.

  3. Downgrade React to version 18, which is compatible with more packages.

It's worth noting that this is a known issue affecting many Next.js 15 users trying to install various packages. The Next.js team is aware of the problem, but a definitive solution hasn't been implemented yet.

For the most up-to-date information and potential fixes, you may want to follow the discussion in Github Issue #72026 (https://github.com/vercel/next.js/issues/72026).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: