You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn add v1.17.3 [1/4] 🔍 Resolving packages... warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: 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
Reproducible sample code
yarn add v1.17.3 [1/4] 🔍 Resolving packages... warning jest > jest-cli > jest-config > jest-environment-jsdom > jsdom > [email protected]: 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
Solution
Here: https://github.com/react-native-community/react-native-template-typescript/issues/80#issuecomment-536236213
Step 1
yarn global remove react-native-cli
or
npm uninstall -g react-native-cli
Step 2
yarn global add @react-native-community/cli
or
npm install -g @react-native-community/cli
Step 3
npx react-native init MyApp --template react-native-template-typescript
The text was updated successfully, but these errors were encountered: