Closed nth-chile closed 3 years ago
This is very likely because you are using the old deprecated React Native CLI. Please try following:
npm uninstall -g react-native-cli
yarn global remove react-native-cli
npx --ignore-existing react-native init MyApp --template react-native-template-typescript
Check here if you need further information: https://github.com/react-native-community/react-native-template-typescript/issues/80
Expected results
For this command to succeed without errors:
npx react-native init MyApp --template react-native-template-typescript
Observed results
It tries to install
react-native-template-react-native-template-typescript
from the yarn package registry and errorserror An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found".
Strangely, if I
cd
into the folder it creates and run the command again with a different name, I get no errors, see the ASCII React logo in terminal, and see a bunch of warnings that look like this:but for six more packages
Logs
From yarn-error.log:
Steps to reproduce
npx react-native init MyApp --template react-native-template-typescript