Skip to content

npm error peer react@"^18.2.0" from next@14.0.4 - Create expo app with nextjs #634

@jakubkanna

Description

@jakubkanna

Describe the bug
When trying to run create command it fails due to incorrect dependencies

To Reproduce
npx create-expo-app -e with-nextjs

Expected behavior
No errors

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

npx create-expo-app -e with-nextjs
Creating an Expo project using the with-nextjs example.

✔ What is your app named?test
✔ Downloaded and extracted example files.
> npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: test@1.0.0
npm error Found: react@19.1.0
npm error node_modules/react
npm error   react@"19.1.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0" from next@14.0.4
npm error node_modules/next
npm error   next@"~14.0.4" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/j/.npm/_logs/2025-11-03T16_19_50_861Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/j/.npm/_logs/2025-11-03T16_19_50_861Z-debug-0.log
Something went wrong installing JavaScript dependencies. Check your npm logs. Continuing to create the app.
Error: npm install exited with non-zero code: 1

✅ Your project is ready!

To run your project, navigate to the directory and run one of the following npm commands.

- cd test
- npm run android
- npm run ios # you need to use macOS to build the iOS project - use the Expo app if you need to do iOS development without a Mac
- npm run web

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions