Skip to content

feat: update to [email protected] #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2022

Conversation

YutaSugimura
Copy link
Contributor

No description provided.

Copy link

@esthor esthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get this merged?
Since the cli is on 0.69.4 now, when someone runs npx react-native init AwesomeTSProject --template react-native-template-typescript it will FAIL to resolve with

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR!   peer react-native@"*" from @react-native-community/[email protected]
npm ERR!   node_modules/@react-native-community/cli
npm ERR!     @react-native-community/cli@"^6.0.0" from [email protected]
npm ERR!   react-native@"0.69.4" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! react-native@"0.69.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"18.0.0" from [email protected]
npm ERR!   node_modules/react-native
npm ERR!     react-native@"0.69.4" 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.
...

In order for someone to be able to use the typescript template as-is, and not risk incorrect dependency resolution, they will need to pass the version number to the CLI. (This is probably not obvious to the majority of react-native init users):

npx [email protected] init AwesomeTSProject --template react-native-template-typescript

@radko93 radko93 merged commit 8113a41 into react-native-community:main Aug 11, 2022
@radko93
Copy link
Collaborator

radko93 commented Aug 11, 2022

Somehow missed that, releasing right now! Thanks!

@esthor
Copy link

esthor commented Aug 11, 2022

Omg, thank you! That was fast! 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants