Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Expo says it is unable to find expo in this project

ErrorUnable to find expo in this project - have you run yarn / npm install yet?

Short answer

The Expo CLI ships inside the expo package, so the project must have expo as a dependency and installed in its own node_modules. The error means one of three things: you are not in the project folder, node_modules was never installed, or expo is not in package.json. Check with npm ls expo.

  • Applies to Node.js 22, npm 10, npm 11, Expo SDK 5x
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    From the folder you run the command in, check that package.json is there and whether npm sees expo.

    ls package.json
    npm ls expo
  2. 2Match what you see, then jump to its fix

    1. 1ls package.json says: No such file or directoryYou are not in the project folderFix
    2. 2package.json lists expo but node_modules is missingnode_modules was never installed (fresh clone, or the folder was deleted)Fix
    3. 3grep finds no "expo" line in package.jsonexpo is not in package.json at all (a plain React Native project)Fix

What does the error look like?

  • Unable to find expo in this project - have you run yarn / npm install yet?

Cause 1 of 3

You are not in the project folder

1Check

npm and the Expo CLI work on the project in the current folder, so a parent or sibling folder gives nothing to find.

pwd
ls package.json

2Fix

Change into the folder that holds package.json, then run the command again.

cd path/to/my-app
npx expo start

3Verify

The dev server starts and prints the QR code.

npx expo start

Confirmed by docs.npmjs.com

Did this fix it?

Cause 2 of 3

node_modules was never installed (fresh clone, or the folder was deleted)

1Check

npm install puts the dependencies from package.json into the local node_modules folder; until it runs, the expo package is not on disk.

grep '"expo"' package.json
ls node_modules/expo 2>&1 | head -n 2

2Fix

Install the dependencies.

npm install

3Verify

The folder node_modules/expo now exists and npm ls expo shows a version.

npm ls expo

Confirmed by docs.npmjs.com

Did this fix it?

Cause 3 of 3

expo is not in package.json at all (a plain React Native project)

1Check

The Expo docs state that the Expo CLI is included in the expo package, so a project without that dependency has no npx expo to run.

grep '"expo"' package.json

2Fix

Add the expo package as a dependency; npm saves a package into dependencies by default. Then follow Expo's install guide for the exact SDK version your React Native version needs.

npm install expo

3Verify

The CLI now runs from the project.

npx expo --help

Confirmed by raw.githubusercontent.com

Did this fix it?

How do I stop it coming back?

  • Run npm install (or your package manager's install) after every clone or branch switch that changes package.json.
  • Commit package.json and the lock file, never node_modules.
  • Start the server with npx expo start from the project root only.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.