When I try to create a react native project version 0.59.9 I get the following error
error Error: Couldn't find the "/var/folders/zc/h93bvpb573q24_5ynvgkn1wc0000gn/T/rncli-init-template-0YT6FZ/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid.
How can I resolve this issue?
The mand I used is npx react-native init Awesome --version 0.59.9
How can I resolve this issue, and what could be the cause of it?
Here's a screenshot of the terminal as well
Thanks
When I try to create a react native project version 0.59.9 I get the following error
error Error: Couldn't find the "/var/folders/zc/h93bvpb573q24_5ynvgkn1wc0000gn/T/rncli-init-template-0YT6FZ/node_modules/react-native/template.config.js file inside "react-native" template. Please make sure the template is valid.
How can I resolve this issue?
The mand I used is npx react-native init Awesome --version 0.59.9
How can I resolve this issue, and what could be the cause of it?
Here's a screenshot of the terminal as well
Thanks
Share Improve this question asked Jul 28, 2020 at 9:18 Jihad NajiJihad Naji 3111 gold badge4 silver badges13 bronze badges3 Answers
Reset to default 17Be sure uninstall global react-native/cli as described react-native tutorials
Try to use
--npm
end of init mand if you had yarn and npm both.npx react-native init MyApp --npm
Note: If you have both yarn and npm installed on your machine, React Native CLI will always try to use yarn, so even if you use npx utility, only react-native executable will be installed using npm and the rest of the work will be delegated to yarn. You can force usage of npm adding --npm flag to the mand.
You can try to use a template from another version
npx react-native init Awesome --version 0.59.9 [email protected]
This Worked For me npx react-native@latest init ProjectName --pm npm