npx react-native init MyApp --template react-native-template-typescript not working
// ================ react-native-template-typescript =====================
########### This template only works with the new CLI.###############
first check if you have right react-native-cli intall
check via
)=====> react-native-cli -v
if exixst uninstall
)=====> npm uninstall -g react-native-cli
)=====> yarn global remove react-native-cli
now install again.
)=====> npm i -g @react-native-community/cli
===================if still not work now try this commant
)=====> npx --ignore-existing react-native init MyApp --template react-native-template-typescript
4.3
10
There seems to be quite some confusion about the legacy CLI.
This template only works with the new CLI.
Make sure you have uninstalled the legacy react-native-cli first (npm uninstall -g react-native-cli),
for the below command to work.
If you wish to not use npx
you can also install the new CLI globally (npm i -g @react-native-community/cli or yarn global add @react-native-community/cli).
Thank you!
10
0
Are there any code examples left?
New code examples in category TypeScript