Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while creating react-native cli project

Tags:

react-native

Error:

Error: Couldn't find the "C:\Users\Admin\AppData\Local\Temp\rncli-init-template-oScLDz\node_modules\react-native\template.config.js file inside "react-native" template. Please make sure the template is valid. Read more: https://github.com/react-native-community/cli/blob/master/docs/init.md#creating-custom-template

Screenshot:

enter image description here

like image 366
Kanad Patil Avatar asked Oct 19 '25 15:10

Kanad Patil


2 Answers

I have tried with npm using and it worked.

npx react-native init YourAwesomeProject --npm

After that I have uninstalled yarn completely. Because you can install libraries using npm. So I have removed the yarn using

npm uninstall -g yarn
like image 142
Akshay Bhimani Avatar answered Oct 22 '25 03:10

Akshay Bhimani


You can try:

  • Remove the global react-native CLI: npm uninstall -g react-native-cli or yarn global remove react-native-cli

  • And run again npx react-native init YourAwesomeProject

    or

  • Run npx react-native-cli init YourAwesomeProject

Maybe these links can help:

https://github.com/react-native-community/cli#about

How to fix "Can not find module ".../template.config" error in React Native

like image 24
Luan Eduardo Avatar answered Oct 22 '25 04:10

Luan Eduardo