react-native-community/react-native-template-typescript

Using with specified version of RN doesn't work

ViktorVojtek opened this issue · 1 comments

Expected results

To install a proper version of RN

Observed results

No matter what version is specified in command "npx react-native init MyApp --template react-native-template-typescript@6.x.x" cli always trying to instal RN v. 0.70.6 and fails.

Logs

OS: MacOs Ventura 13.0

npx react-native init MyApp --template react-native-template-typescript@6.11.5

Need to install the following packages:
  react-native@0.70.6
Ok to proceed? (y) y

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: undefined@undefined
npm ERR! Found: react-native@0.64.3
npm ERR! node_modules/react-native
npm ERR!   peer react-native@">=0.64.0-rc.0 || 0.0.0-*" from @react-native-community/cli@5.0.1-alpha.2
npm ERR!   node_modules/@react-native-community/cli
npm ERR!     @react-native-community/cli@"^5.0.1-alpha.1" from react-native@0.64.3
npm ERR!   react-native@"0.70.6" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! react-native@"0.70.6" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react@18.1.0
npm ERR! node_modules/react
npm ERR!   peer react@"18.1.0" from react-native@0.70

Steps to reproduce

  1. In terminal execute:
npx react-native init MyApp --template react-native-template-typescript@6.11.9

Upgrade global module @react-native-community/cli resolve the issue.