React Native iOS and Android folders not present
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
If a React Native project does not contain ios and android folders, the first question is how the project was created. In a traditional bare React Native app, those folders are present because native build projects are part of the repo. In an Expo managed project, they are often absent by design until you generate them. So the missing folders are not always an error.
Know Which Workflow You Are Using
There are two common cases.
Bare React Native Project
A bare React Native project includes native project files from the start. The repository normally contains:
- '
ios/' - '
android/' - JavaScript or TypeScript source files
- native build configuration
If you created the project as a native React Native app and those folders are missing, something unusual happened.
Expo Managed Project
An Expo managed project focuses on JavaScript and configuration first. In that workflow, native folders may not exist initially because Expo generates or manages native configuration for you.
That is why a project created with Expo can look much lighter than an older bare React Native template.
How to Confirm the Project Type
Check package.json and the installed tooling.
If you see Expo-centered scripts and dependencies, that is a strong hint the project is managed or prebuild-based.
If you are in an Expo project and now need native folders, generate them instead of assuming the project is broken.
That command creates the ios and android directories from the Expo configuration.
When the Folders Should Already Exist
If the project was intended to be bare React Native, the native folders should normally already be there. In that case, check whether:
- the repository was copied incompletely
- '
.gitignoreor another cleanup step removed them unintentionally' - you are inside the wrong subdirectory
- a starter template or wrapper tool created a managed-style app instead
A quick filesystem check helps:
If nothing is found, inspect the project creation command used originally.
What to Do Next
Use the fix that matches the workflow.
For Expo managed workflow:
For a native React Native project that was never created correctly, recreate it or compare it against a clean project template and copy your JavaScript source over.
If you only need JavaScript-level work and no native customization, you may not need the folders at all. That is normal in managed workflows.
Common Pitfalls
- Assuming every React Native project must contain
iosandandroidfrom day one. - Treating an Expo managed project as if it were a bare native project.
- Running native build commands before confirming whether native folders exist by design.
- Regenerating native folders without understanding that they become part of your native surface area to maintain.
- Looking in the wrong directory when the actual app lives in a nested workspace folder.
Summary
- Missing
iosandandroidfolders are normal in some React Native workflows, especially Expo managed projects. - In a bare React Native app, those folders should usually already exist.
- Check the project type before trying to fix anything.
- Use
npx expo prebuildwhen you need to generate native folders for an Expo-based app. - If the project was supposed to be bare from the start, verify the repo contents and project creation method.
Related reading
- React Native ios build Can't find node
- React Native Responsive Font Size
- react native use variable for image file
- React React-router async components mounted multiple times componentDidMount called many times
- ReactiveCocoa vs RxSwift - pros and cons?
- React/RCTBridgeModule.h file not found
- react router doesn't work in aws s3 bucket
- React Router DOM not working correctly on Amplify Console AWS
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.