vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo
MIT License
26.5k stars 1.85k forks source link

`npx create-turbo@latest -e with-react-native-web` fails installation #9100

Open AntoninoGargiuloBID opened 3 months ago

AntoninoGargiuloBID commented 3 months ago

Verify canary release

Link to code that reproduces this issue

CodeSandbox Devbox

What package manager are you using / does the bug impact?

npm

What operating system are you using?

Windows

Which canary version will you have in your reproduction?

2.1.1-canary.0

Describe the Bug

The command npx create-turbo@latest -e with-react-native-web, after choosing npm as package manager, fails its execution, with the following error message:

>>> Unexpected error. Please report it as a bug:
Error: Command failed with exit code 1: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: native@1.0.0
npm ERR! Found: react@18.2.0
npm ERR! apps/native/node_modules/react
npm ERR!   react@"^18.2.0" from native@1.0.0
npm ERR!   apps/native
npm ERR!     native@1.0.0
npm ERR!     node_modules/native
npm ERR!       workspace apps\native from the root project
npm ERR!   peer react@"18.2.0" from react-native@0.73.1
npm ERR!   apps/native/node_modules/react-native
npm ERR!     react-native@"0.73.1" from native@1.0.0
npm ERR!     apps/native
npm ERR!       native@1.0.0
npm ERR!       node_modules/native
npm ERR!         workspace apps\native from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-native-web@"^0.19.10" from native@1.0.0
npm ERR! apps/native
npm ERR!   native@1.0.0
npm ERR!   node_modules/native
npm ERR!     workspace apps\native from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react@18.3.1
npm ERR! node_modules/react
npm ERR!   peer react@"^18.3.1" from react-dom@18.3.1
npm ERR!   node_modules/react-dom
npm ERR!     react-dom@"^18.2.0" from native@1.0.0
npm ERR!     apps/native
npm ERR!       native@1.0.0
npm ERR!       node_modules/native
npm ERR!         workspace apps\native from the root project
npm ERR!     peer react-dom@"^18.0.0" from react-native-web@0.19.12
npm ERR!     node_modules/react-native-web
npm ERR!       react-native-web@"^0.19.10" from native@1.0.0
npm ERR!       apps/native
npm ERR!         native@1.0.0
npm ERR!         node_modules/native
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.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_logs\2024-09-02T15_59_53_699Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_logs\2024-09-02T15_59_53_699Z-debug-0.log        
    at CM (C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_npx\e8c68b66aeb1424f\node_modules\create-turbo\dist\cli.js:23:57)
    at C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_npx\e8c68b66aeb1424f\node_modules\create-turbo\dist\cli.js:23:8077
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ph (C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_npx\e8c68b66aeb1424f\node_modules\create-turbo\dist\cli.js:69:2060)
    at async Command.Eg (C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_npx\e8c68b66aeb1424f\node_modules\create-turbo\dist\cli.js:94:7474)
    at async Command.parseAsync (C:\Users\AntoninoGargiulo\AppData\Local\npm-cache\_npx\e8c68b66aeb1424f\node_modules\commander\lib\command.js:936:5) {  
  shortMessage: 'Command failed with exit code 1: npm install',
  command: 'npm install',
  escapedCommand: 'npm install',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'npm ERR! code ERESOLVE\n' +
    'npm ERR! ERESOLVE could not resolve\n' +
    'npm ERR! \n' +
    'npm ERR! While resolving: native@1.0.0\n' +
    'npm ERR! Found: react@18.2.0\n' +
    'npm ERR! apps/native/node_modules/react\n' +
    'npm ERR!   react@"^18.2.0" from native@1.0.0\n' +
    'npm ERR!   apps/native\n' +
    'npm ERR!     native@1.0.0\n' +
    'npm ERR!     node_modules/native\n' +
    'npm ERR!       workspace apps\\native from the root project\n' +
    'npm ERR!   peer react@"18.2.0" from react-native@0.73.1\n' +
    'npm ERR!   apps/native/node_modules/react-native\n' +
    'npm ERR!     react-native@"0.73.1" from native@1.0.0\n' +
    'npm ERR!     apps/native\n' +
    'npm ERR!       native@1.0.0\n' +
    'npm ERR!       node_modules/native\n' +
    'npm ERR!         workspace apps\\native from the root project\n' +
    'npm ERR! \n' +
    'npm ERR! Could not resolve dependency:\n' +
    'npm ERR! react-native-web@"^0.19.10" from native@1.0.0\n' +
    'npm ERR! apps/native\n' +
    'npm ERR!   native@1.0.0\n' +
    'npm ERR!   node_modules/native\n' +
    'npm ERR!     workspace apps\\native from the root project\n' +
    'npm ERR! \n' +
    'npm ERR! Conflicting peer dependency: react@18.3.1\n' +
    'npm ERR! node_modules/react\n' +
    'npm ERR!   peer react@"^18.3.1" from react-dom@18.3.1\n' +
    'npm ERR!   node_modules/react-dom\n' +
    'npm ERR!     react-dom@"^18.2.0" from native@1.0.0\n' +
    'npm ERR!     apps/native\n' +
    'npm ERR!       native@1.0.0\n' +
    'npm ERR!       node_modules/native\n' +
    'npm ERR!         workspace apps\\native from the root project\n' +
    'npm ERR!     peer react-dom@"^18.0.0" from react-native-web@0.19.12\n' +
    'npm ERR!     node_modules/react-native-web\n' +
    'npm ERR!       react-native-web@"^0.19.10" from native@1.0.0\n' +
    'npm ERR!       apps/native\n' +
    'npm ERR!         native@1.0.0\n' +
    'npm ERR!         node_modules/native\n' +
    'npm ERR! \n' +
    'npm ERR! Fix the upstream dependency conflict, or retry\n' +
    'npm ERR! this command with --force or --legacy-peer-deps\n' +
    'npm ERR! to accept an incorrect (and potentially broken) dependency resolution.\n' +
    'npm ERR! \n' +
    'npm ERR! \n' +
    'npm ERR! For a full report see:\n' +
    'npm ERR! C:\\Users\\AntoninoGargiulo\\AppData\\Local\\npm-cache\\_logs\\2024-09-02T15_59_53_699Z-eresolve-report.txt\n' +
    '\n' +
    'npm ERR! A complete log of this run can be found in: C:\\Users\\AntoninoGargiulo\\AppData\\Local\\npm-cache\\_logs\\2024-09-02T15_59_53_699Z-debug-0.log',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

The error message says to report this error as bug.

Expected Behavior

proper installation of all the dependencies, both web and native projects ready to start.

To Reproduce

just run the command npx create-turbo@latest -e with-react-native-web, and the installation will fail.

Additional context

No response

albertovasquez commented 1 month ago

This issue still persists