can not run `npx react-native init MyApp --template react-native-template-typescript`
See original GitHub issueBug
Environment info
React native info output:
// paste it here
Library version: x.x.x
Steps To Reproduce
…
Describe what you expected to happen:
Reproducible sample code
yarn add v1.17.3
[1/4] 🔍 Resolving packages...
warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > left-pad@1.3.0: use String.prototype.padStart()
error An unexpected error occurred: "https://registry.npmjs.org/react-native-template-react-native-template-typescript: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/Users/kenny/react0611/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
yarn remove v1.17.3
[1/2] 🗑 Removing module react-native-template-react-native-template-typescript...
error This module isn't specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/remove for documentation about this command.
warn Failed to clean up template temp files in node_modules/react-native-template-react-native-template-typescript. This is not a critical error, you can work on your app.
(node:2599) UnhandledPromiseRejectionWarning: Error: Command failed: yarn add react-native-template-react-native-template-typescript
at makeError (/Users/kenny/react0611/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/Users/kenny/react0611/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2599) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:2599) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
k
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:36 (6 by maintainers)
Top Results From Across the Web
Create App with React Native and typescript - Stack Overflow
To fix the issue try uninstalling the CLI: npm uninstall -g react-native-cli or yarn global remove react-native-cli and then run the npx command...
Read more >react-native-template-typescript - npm
Start using react-native-template-typescript in your project by running `npm i react-native-template-typescript`. There are no other ...
Read more >react-native-template-typescript - npm package - Snyk
Learn more about react-native-template-typescript: package health score, ... npx react-native init MyApp --template react-native-template-typescript ...
Read more >Setting up the development environment - React Native
If they are not installed, you should expect to spend about an hour ... Expo Go allows you to run your React Native...
Read more >not working npx react-native init MyApp - Code Grepper
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have...
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

Just remember to
npm uninstall -g react-native-cliandyarn global add @react-native-community/cliso you have new features during starting a new projectCan you try adding the
--ignore-existingflag?npx --ignore-existing react-native init MyApp --template react-native-template-typescript