npx react-native init MyApp --template react-native-template-typescript does not work correctly
See original GitHub issueBug
Environment info
React native info output:
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 1.15 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 12.6.0 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.3, 25.0.1, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom
Android NDK: 19.2.5345600
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Library version: x.x.x
Steps To Reproduce
- After running command
npx react-native init MyApp --template react-native-template-typescriptI get below error in terminal
The installer is looking for package react-native-template-react-native-template-typescript which is not available.
- After removing react-native-template- & running command
npx react-native init MyApp --template typescriptI get below folder structure which is incorrect.
Typescript project is created inside template directory.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:10 (1 by maintainers)
Top Results From Across the Web
can not run `npx react-native init MyApp --template ... - GitHub
I uninstalled the react-native-cl and tried several different way to execute the npx call. Is there another way to get a new project...
Read more >npx react-native init creates app with wrong version of React ...
Solved by changing this: npx react-native init MyApp --template react-native-template-typescript@6.5.* to this npx react-native init MyApp ...
Read more >react-native-template-typescript - npm
Clean and minimalist React Native template for a quick start with TypeScript.. Latest version: 6.12.6, last published: 8 days ago.
Read more >Setting up the development environment - React Native
This page will help you install and build your first React Native app. ... If you have a problem with Expo, before creating...
Read more >Create an interactive React Native template
You can easily use a template to create your app with the React ... npx react-native init MyApp --template react-native-template-typescript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

IMPORTANT STEP: Remove your globally installed react-native-cli:
npm uninstall -g react-native-cliThen install using npx:
npx react-native init app --template react-native-template-typescriptWith npx: