Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating react-native project with typescript template fails. #30557

Closed
cryptodev523 opened this issue Dec 9, 2020 · 4 comments
Closed

Creating react-native project with typescript template fails. #30557

cryptodev523 opened this issue Dec 9, 2020 · 4 comments
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.

Comments

@cryptodev523
Copy link

Description

I tried to create new react-native project with typescript template.
But after running npx react-native init Sample --template react-native-template-typescript command, it failed.

React Native version:

0.63

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Run the following command in the terminal.
    npx react-native init Sample --template react-native-template-typescript

Expected Results

Create a new react-native project with typescript template.

Snack, code example, screenshot, or link to a repository:

Arguments: 
  /usr/local/Cellar/node/15.3.0/bin/node /usr/local/Cellar/yarn/1.22.10/libexec/bin/yarn.js add react-native-template-react-native-template-typescript

PATH: 
  /Volumes/Data/WORK/devHabit/AAAAA/node_modules/.bin:/Volumes/Data/WORK/devHabit/node_modules/.bin:/Volumes/Data/WORK/node_modules/.bin:/Volumes/Data/node_modules/.bin:/Volumes/node_modules/.bin:/node_modules/.bin:/usr/local/Cellar/node/15.3.0/bin:/Volumes/Data/WORK/devHabit/node_modules/.bin:/Volumes/Data/WORK/node_modules/.bin:/Volumes/Data/node_modules/.bin:/Volumes/node_modules/.bin:/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/topmaster/Library/Android/sdk/emulator:/Users/topmaster/Library/Android/sdk/tools:/Users/topmaster/Library/Android/sdk/tools/bin:/Users/topmaster/Library/Android/sdk/platform-tools

Yarn version: 
  1.22.10

Node version: 
  15.3.0

Platform: 
  darwin x64

Trace: 
  Error: https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found
      at Request.params.callback [as _callback] (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:66988:18)
      at Request.self.callback (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:140749:22)
      at Request.emit (node:events:376:20)
      at Request.<anonymous> (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:141721:10)
      at Request.emit (node:events:376:20)
      at IncomingMessage.<anonymous> (/usr/local/Cellar/yarn/1.22.10/libexec/lib/cli.js:141643:12)
      at Object.onceWrapper (node:events:482:28)
      at IncomingMessage.emit (node:events:388:22)
      at endReadableNT (node:internal/streams/readable:1294:12)
      at processTicksAndRejections (node:internal/process/task_queues:80:21)
@giangdinh
Copy link

@devhabit it's yarn bug, sometimes it can not found packages. Please try this: yarnpkg/yarn#5865

@cryptodev523
Copy link
Author

@devhabit it's yarn bug, sometimes it can not found packages. Please try this: yarnpkg/yarn#5865

I think so.
But as you can see from log - it is finding react-native-template-react-native-template-typescript package.

@cryptodev523
Copy link
Author

I could clone typescript template project by using command npx react-native init <PROJECT_NAME> --template typescript

@giangdinh
Copy link

giangdinh commented Dec 11, 2020

I use npx react-native init <PROJECT_NAME> --template react-native-template-typescript and it works. I think s we do not have template typescript. Please check: https://github.com/react-native-community/react-native-template-typescript

@facebook facebook locked as resolved and limited conversation to collaborators Dec 23, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Triage 🔍 Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants