Okay so after a bit of research and the error I got now it is clear that this is a problem from npm so I just installed react-native-cli instead of expo-cli and it worked.
thanks for the support.
Answer from The Destroyer on Stack OverflowVideos
Okay so after a bit of research and the error I got now it is clear that this is a problem from npm so I just installed react-native-cli instead of expo-cli and it worked.
thanks for the support.
npm install -g react-native-cli
react-native init AwesomeApp
cd AwesomeApp
npm start
» npm install expo-cli
although this solution is not the best and the safest solution exists, this worked for me and that make sense because all the problem we had with the errors is the permission problems. so you can use this command and ignore those permission problems :
sudo npm install expo-cli -g --unsafe-perm
I was having the same problem with npm install -g expo-cli, having "MODULE_NOT_FOUND",
I installed yarm with brew, just in case you do not already have it:
brew install yarn
and then use:
yarn global add expo-cli
to create a project you can:
expo init nameOfTheNewProject
and choose a template in the console. Finally run the project with
yarn start
Let me know if it works for you!
For Yarn:
If you want to save expo-cli package globally then try
yarn global add expo-cli
and if you want expo-cli to be available in the folder in which you are currently working then use
yarn add expo-cli
For npm:
npm install expo-cli --global
or
npm install expo-cli
There's a similar issue reported here. You can try adding expo to your local project to see if that helps.
Try:
yarn add expo