Reputation: 357
I'm trying to create new react new app with typescript with the command
npx react-native init myApp --version 0.68.2 --template react-native-template-typescript
and I'm getting an error
error An unexpected error occurred: "https://registry.npm.taobao.org/react-native-template-react-native-template-typescript: [NOT_FOUND] react-native-template-react-native-template-typescript not found".
node version: v16.10.0
npm version:7.24.0
what I already tried to do
npx --ignore-existing react-native init MyApp --template react-native-template-typescript
nothing helped to solve this issue.
Upvotes: 2
Views: 1253
Reputation: 42
can you try this line
npx --ignore-existing react-native init MyApp --template typescript
it should work to you
Upvotes: -1
Reputation: 932
From the screenshot it seems like the template name is being picked up incorrectly for some reason
it should be looking for https://registry.npmmirror.com/react-native-template-typescript
instead of https://registry.npmmirror.com/react-native-template-react-native-template-typescript
Can you try
npx --ignore-existing react-native init MyApp --template typescript
Since the taobao npm has been moved to npmmirror. Reference
Upvotes: 2
Reputation: 459
Use:
$ npx react-native init MyApp --template react-native-template-typescript
(w/o a version tag)
Upvotes: 1