question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native-template-typescript error

See original GitHub issue

i’m trying to install RN with typescript template and i’m getting this error:

error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found".

an indeed https://registry.yarnpkg.com/react-native-template-react-native-template-typescript is returning

{"error":"Not found"}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
SConawaycommented, Jul 30, 2020

react-native-cli has been deprecated for 4 years. It should be removed. You could install react-native or @react-native-community/cli globally (not recommended). Instead, the best way is to use npx. npx installs whatever package you ask it to into a temporary directory where it’s then run and removed. This is preferred, since it will use either a locally installed one in your project or it will use the latest version.

2reactions
cmnstmntmncommented, Jul 20, 2020

@SConaway well it seems the

npx react-native init AwesomeTSProject --template typescript

works fine

as far as i can see the link to fetch the template from, is constructed this way

https://registry.yarnpkg.com/react-native-template- + TEMPLATE_ARGS

so having react-native-template-typescript as arg for --template will produce an invalid url (the one in the error)

Read more comments on GitHub >

github_iconTop Results From Across the Web

can not run `npx react-native init MyApp --template ... - GitHub
padStart() error An unexpected error occurred: "https://registry.npmjs.org/react-native-template-react- native-template-typescript: Not found".
Read more >
Create App with React Native and typescript - Stack Overflow
I'm trying to create an app with React Native and TypeScript, but it's not working. I use the ...
Read more >
react-native-template-typescript - npm
Clean and minimalist React Native template for a quick start with TypeScript.. Latest version: 6.12.10, last published: a month ago.
Read more >
Using TypeScript - React Native
If you're starting a new project, there are a few different ways to get started. You can use the TypeScript template: npx react-native...
Read more >
template react-native-template-typescript - appsloveworld
Coding example for the question error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found