26

I'm Unable to execute the expo start command.

Error Message:

PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> expo start
Starting project at C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project

Unable to find expo in this project - have you run yarn / npm install yet?
    ├─ action (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:34:11)
    ├─ C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:135:22
    └─ expo start (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:350:7)
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm install
added 28 packages, removed 46 packages, changed 34 packages, and audited 653 packages in 8s
17 packages are looking for funding
  run `npm fund` for details
7 low severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm audit

npm audit report

node-fetch  <=2.6.0 || 3.0.0-beta.1 - 3.0.0-beta.8
Denial of Service - https://npmjs.com/advisories/1556
No fix available
node_modules/isomorphic-fetch/node_modules/node-fetch
  isomorphic-fetch  2.0.0 - 2.2.1
  Depends on vulnerable versions of node-fetch
  node_modules/isomorphic-fetch
    fbjs  0.7.0 - 1.0.0
    Depends on vulnerable versions of isomorphic-fetch
    node_modules/fbjs
      metro  0.22.1 - 0.63.0
      Depends on vulnerable versions of fbjs
      Depends on vulnerable versions of metro-config
      node_modules/metro
        @react-native-community/cli  *
        Depends on vulnerable versions of metro
        Depends on vulnerable versions of react-native
        node_modules/@react-native-community/cli
          react-native  <=0.0.0-ffdfbbec0 || 0.22.0-rc - 0.64.0-rc.4
          Depends on vulnerable versions of @react-native-community/cli
          Depends on vulnerable versions of fbjs
          node_modules/react-native
        metro-config  <=0.63.0
        Depends on vulnerable versions of metro
        node_modules/metro-config
7 low severity vulnerabilities\
Some issues need review, and may require choosing
a different dependency```
stuckoverflow
  • 625
  • 2
  • 7
  • 23
Ishika IT
  • 299
  • 1
  • 3
  • 4

20 Answers20

42

enter image description here

  1. Change expo version from "^1.0.0" to "~41.0.1" (package.json)
  2. npm install
  3. npm start
Andrew Morton
  • 24,203
  • 9
  • 60
  • 84
Ravshan
  • 471
  • 5
  • 2
27

if anyone is still facing issues, run

yarn add expo

if you don't have yarn installed on your computer then run

npm install -g yarn

and then run the first command.

GloatingCoder
  • 1,124
  • 9
  • 13
20

I also received your message when installing the commands in the "React Navigation" set-up instructions and fixing vulnerabilities. The problem arises when using the command: npm audit fix --force. If you check the warnings after this command, you get

npm WARN audit Updating expo to 1.0.0, which is a SemVer major change.

So, try running: sudo expo update

If that doesn't work, try installing expo again with: npm install --global expo-cli and then update.

buddemat
  • 4,552
  • 14
  • 29
  • 49
Pablo Guarneros
  • 201
  • 2
  • 4
13

I'm also facing this error. So I run the npm command in the terminal.

npm install

You do not need to change the expo version. you just reinstall it.

10
  1. Update the Expo to the latest version sudo expo update enter image description here

  2. Then install the updated npm packages npm install enter image description here

  3. Fix the issues in the packages npm audit fix --force enter image description here

  4. Run the Application npm start or expo start enter image description here

3

Error ? you are trying to launch the expo framework yet it can't be found installed as part of your application modules

solution? simply find the latest version of Expo i.e for my case "expo": "^44.0.0", then go to your package.json file in your root folder, under the "dependencies" property plug-in that Expo version i.e

"dependencies":{
    "expo": "^44.0.0", 
}

close package.json file, then in your root folder run the command: npm install after package installation is done run expo start

Saeid Amini
  • 1,313
  • 5
  • 16
  • 26
bitbuoy
  • 353
  • 2
  • 8
3

I simply used the expo update command.

It asked me

You are currently using SDK 1.0.0. Would you like to update to the latest version, 44.0.0?

and I said yes, y not..

Every Thing was good to go with the npm start command

Cheers..

1

See the expo version - default "^1.0.0" , change ==> "expo": "~41.0.1"

Yanov
  • 655
  • 7
  • 13
1
  • Change expo to version "~43.0.0" in package.json
  • run npm audit fix --force in node_modules directory
Peter Csala
  • 17,736
  • 16
  • 35
  • 75
1

here are my 2 cents. This worked for me :

  1. Download latest version of nodejs - https://nodejs.org/en/download/
  2. After installing nodejs reboot your computer
  3. install : npm install --global expo-cli
  4. Generate a new project with - npx expo-cli init projectName
  5. cd projectName
  6. npm start
AB1
  • 69
  • 7
1

Is possible that you need an update try this command:

 sudo expo update
Roytman Piccoli
  • 1,302
  • 1
  • 4
  • 13
0

you can run the below to install all dependencies

  1. npm i

or to install exp

  1. npm i -g expo-cli
Tomislav Stankovic
  • 3,080
  • 17
  • 35
  • 42
ago coded
  • 1
  • 1
0

This problem I faced was because of cloning a new project and trying to run it.

Always install the modules using the below command

I solved this by

npm install or npm i

Sushil
  • 103
  • 1
  • 8
  • Not really a good advice as npm install, install the latest version of any library / dependency, but if is a old project some latest dependency could conflict – Carmine Tambascia Aug 30 '22 at 15:45
  • I don't think npm install installs the latest version. That's simply not how npm works. – Suman Thapa Magar Sep 02 '22 at 12:09
  • well instead it does, have a look at package.json and package-lock.json version number after have run npm install. – Carmine Tambascia Sep 02 '22 at 13:13
  • npm install (in package directory, no arguments): Install the dependencies in the local node_modules folder. In global mode (ie, with -g or --global appended to the command), it installs the current package context (ie, the current working directory) as a global package. By default, npm install will install all modules listed as dependencies in package.json. – Suman Thapa Magar Sep 05 '22 at 08:39
  • This is the npm install documentation from https://docs.npmjs.com/cli/v6/commands/npm-install. Feel free to find me any link or documentation that says npm install will update your dependencies from package.json file instead of installing them. – Suman Thapa Magar Sep 05 '22 at 08:42
  • please read the answers here https://stackoverflow.com/questions/45022048/why-does-npm-install-rewrite-package-lock-json, on top even npm ci for me is not always working as in a project I have it did failed to re-install dependencies – Carmine Tambascia Sep 09 '22 at 06:59
0

I had same problem.

I simply used the expo update command.

You are currently using SDK 1.0.0. Would you like to update to the latest version, 44.0.0?

and I said yes.

Every Thing was good to go with the npm start command

thats all

Nate
  • 1
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 25 '22 at 15:42
0

Please try this

npm install --save expo --legacy-peer-deps

no need to edit package.json if expo version is not 1.0.0

0

You should register first on expo and then login

I had the same issue but after I logged in it was solved. here is all about : https://docs.expo.dev/get-started/installation/

Giorgos Xou
  • 1,461
  • 1
  • 13
  • 32
0

In my case, I clonned a Github repository and then used create-expo-app inside the repository directory. So, the command created a directory with the name of the app, but I was not in it: I was running the expo run command in the wrong directory.

Double check that the package.json is in the same directory in which you are running yarn or expo run to avoid this simple mistake.

Esteban
  • 101
  • 3
  • 6
0

The same error happened to me. But none of the other answers helped me. In my situation, I have node.js v18.12.1 installed. But when I check with nvm ls, the arrow points to "system", and on my system Xubuntu 22.04, the nodejs version installed is v12.22.9. So I needed to do nvm use 18, then

yarn add expo
expo start

Problem solved!

LXJ
  • 1,180
  • 6
  • 18
0

for window users just type expo update into your terminal,

0

We can quickly resolve this issue by navigating to package.json file in the project folder. Then replace

"expo": "^48.0.6"

with

"expo": "~48.0.6"

or latest version of expo. Then in current project directory run

npm install

This will update entire package dependencies. Then run command npm run android.

John Polo
  • 547
  • 1
  • 8
  • 25