React Native
iOS
Android
Folder Structure
Troubleshooting

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.

Browse interview questions

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.

json
1{
2  "scripts": {
3    "start": "expo start"
4  },
5  "dependencies": {
6    "expo": "~x.y.z",
7    "react-native": "x.y.z"
8  }
9}

If you are in an Expo project and now need native folders, generate them instead of assuming the project is broken.

bash
npx expo prebuild

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
  • '.gitignore or 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:

bash
pwd
ls -la
find . -maxdepth 2 -type d \( -name ios -o -name android \)

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:

bash
npx expo prebuild

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 ios and android from 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 ios and android folders 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 prebuild when 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
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track 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.

Browse interview questions

All Rights Reserved.