Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npx react-native init AwesomeProject error enolocal

i got an error while trying to create react native app using npx npx

react-native init AwesomeProject

like the docs said. But i got an error messages

npm ERR! code ENOLOCAL npm ERR! Could not install from "Indigo\AppData\Roaming\npm-cache_npx\3192" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in: C:\Users\Durio Indigo\AppData\Roaming\npm-cache_logs\2020-07-08T08_20_54_191Z-debug.log Install for react-native@latest failed with code 1

i know it's not from the npx because i tried to create react app with npx and it works. Am I the only one who had this?

like image 834
Ilham Akbar Avatar asked Sep 07 '26 21:09

Ilham Akbar


2 Answers

I had you try npm cache clear and if using windows you can run command npx react-native init AwesomeProject in Command promt using Run as Administrator

like image 134
Abdul Rahmat Avatar answered Sep 10 '26 16:09

Abdul Rahmat


I have faced the same issue, do nothing just a quick fix.

first, run the command npm i react-native@latest -g then create your project with your command i.e npx react-native init myProject

like image 30
Shahroz Ahmed Avatar answered Sep 10 '26 14:09

Shahroz Ahmed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!