Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again
Asked Answered
T

7

8

i'm new to react-native i installed expo as mention in official page like below.

npm install expo-cli --global

expo init my-new-project
cd my-new-project

expo start(run this in my cmd)

Get this error in cmd

[09:53:03] TypeError: Cannot read property 'compile' of undefined

npm start(i did this too)

Get this error in cmd

[09:47:17] TypeError: Cannot read property 'compile' of undefined

I get this error in my Browser Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again.

Tallulah answered 26/11, 2018 at 4:37 Comment(0)
B
7

Something is missing, Run following

npm install

and then

expo start
Brilliantine answered 1/6, 2019 at 9:35 Comment(0)
Y
0

It seems like an error from expo-cli. There is a thread in react native expo-cli github page. Please check out the link below.

https://github.com/expo/expo-cli/issues/213#issuecomment-441507128

If the above work around isn't working for you, please use react-native-cli and initiate the project.

npm install -g react-native-cli
Yonder answered 26/11, 2018 at 6:50 Comment(0)
L
0

Maybe expo not install correctly so you need to one more time run this command:

npm install -g expo-cli

then

expo start
Lissner answered 26/11, 2018 at 9:47 Comment(3)
I tried running the second command it says "run" is not an expo command. See "expo --help" for the full list of command... I am using macos mojaveFranglais
having some problem. this solution didnt work for meHightest
@Jitendra is this outdated? since I too got the same error as Neeraj.Doorpost
F
0

It was a bug in the older version in expo cli, which has been removed. What you can do now is run this command:

npm uninstall -g expo-cli && npm i -g expo-cli

Check this Expo github issue for more info

Franglais answered 26/11, 2018 at 12:28 Comment(0)
C
0

use this command I fix similar issues like this

$ sudo npm install   

then

$ sudo expo start 
Complot answered 25/3, 2021 at 2:24 Comment(0)
D
0

I solved my problem using these two commands:

sudo npm install and then sudo expo start

Deferment answered 26/10, 2021 at 19:17 Comment(2)
it seems like you did the same thing as the other answers, did you possibly forget to add an additional step that you had to take?Yawmeter
I didn't need to take any other steps, just used those commands and my problem is solvedDeferment
O
0

So all the previous answer can give an hint but none of them explain why this is happening. Basically could be the fact that expo wasn't installed but only run via

npx expo-cli init projectName  // for example

then even installing expo-cli won't work if after the previous command are been installed other dependencies such:

expo install react-native-gesture-handler react-native-reanimated react- 
native-screens react-native-safe-area-context

Basically you need to install expo and then install all other dependencies "run" previously with it.

So need to install expo-cli

npm install expo-cli

then install all the other dependencies

Obligee answered 17/11, 2021 at 15:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.