You can do it by ejecting your app running npm run eject
Then, if you have any reference to expo just remove all of them.
your app modules before being ejected looks like this below:
When you run npm run eject it will ask some questions like:
be sure to select React Native: I'd like a regular react Native project
And your folders will now look like this (no expo):
Just be careful because ejecting is a permanent process, you should make a backup of your files.
Answer from Yanci Nerio on Stack OverflowYou can do it by ejecting your app running npm run eject
Then, if you have any reference to expo just remove all of them.
your app modules before being ejected looks like this below:
When you run npm run eject it will ask some questions like:
be sure to select React Native: I'd like a regular react Native project
And your folders will now look like this (no expo):
Just be careful because ejecting is a permanent process, you should make a backup of your files.
Once you eject from Expo, though, and if you're using a Windows computer, you'll only be able to develop for Android, I believe. You'll still need a Mac to work in React Native without Expo. I'm a beginner but just wanted to highlight this difficulty faced by Windows users when ejecting from Expo.
I made a big mistake - I wanted to view my app on a device, and was having trouble with X-Code refusing to recognise my developer credentials. They were fine on the website, but X-Code didn't want a bar of it. So I got frustrated, and someone suggested "Why not use Expo? Then you can just scan a QR code". Oh boy, should have done more research than a quick read of the Expo website before going along with that one! It took 10 minutes after I'd installed Expo to realise I really don't want this.
How do you get rid of Expo from a project that was generated by RN CLI and was half completed before I installed Expo? I haven't done anything I need to keep since installing Expo, so I tried doing a hard reset from the remote git repo I was using (which I had committed to last BEFORE trying Expo), but that didn't work, for reasons I am still trying to work out.
expo eject and npm run eject are both no longer supported, it seems.
To remove a package from your node_modules directory, on the command line, use the uninstall command. Include the scope of the package is scoped.
Unscoped package
npm uninstall --save <package_name>
Scoped package
npm uninstall --save <@scope/package_name>
if need to know more about it then follow official Document here https://docs.npmjs.com/uninstalling-packages-and-dependencies#removing-a-local-package-from-the-packagejson-dependencies
npm uninstall <package name> works. It removes the expo module from your node_modules
for more reference https://docs.npmjs.com/uninstalling-packages-and-dependencies
I have published few apps using expo-cli but now it's all confusing I want to delete some of them but have not found a solution, is that possible?
The only thing close is rollback feature explained here
https://docs.expo.dev/archive/classic-updates/advanced-release-channels/
To completely uninstall expo cli
On Windows
- The first step
npm -g uninstall expo-cli --save(alsoyarn global remove expo-cliif you use yarn). - Second
cd %USERPROFILE% && rmdir /Q /S .expo
On Mac OS Catalina
The first step
npm -g uninstall expo-cli --save(alsoyarn global remove expo-cliif you use yarn).Second
cd ~ && rm -rf .expo
Thanks to @Александр Наумкин and @Liko for editing and comments
I had the same problem and after searching I found this command:
npm -g uninstall expo-cli --save
finally expo-cli is deleted from my pc but it still asks about it every time I type create-react-native-app. if anybody knows how to go on from here be my guest.
and I hope this helps you
edit: if you use react-native init it is almost the same as create-react-native-app without expo-cli. This is how I chose to carry on as using the create command with expo-cli gives the application error after error if you install any api.
New to RN and learning but I want to incorporate React Navigation instead of expo-router. I know that expo's is using React Navigation underneath. I removed it with npm, found whatever references to it and removed them as well, all with no luck. Created a new project using the Expo blank option but still getting an error 'expo-router/_ctx not found'
I cleared cache, removed node_modules, lock file, etc and reinstalled but not resolved. I think I'd prefer to have run the default config but thought going with 'blank' I would avoid the router.