13

I cannot get the Expo DevTools to work. My approach:

npm install -g expo-cli
expo init
cd PROJECTNAME
expo start

I just get this error message in the console:

TypeError: Cannot read property 'compile' of undefined

And this one in the DevTools in the browser:

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

Does anyone know what Iam missing here?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
FBa
  • 135
  • 1
  • 7
  • 1
    I started getting this error today after upgrading expo-cli from 2.1.0 to latest. Reverting to 2.1.0 did not fix the error. – Skyler Austin Nov 25 '18 at 21:33
  • I'm getting the same error when running expo start. – TariqN Nov 25 '18 at 21:50
  • I also got this error just now, I have two VMs in one of the VMs its working fine. To be further sure I made a new project by doing 'expo init' then expo start and it crashes for the new project as well. – Salar Khan Nov 25 '18 at 21:50
  • 5
    Just filed a github issue with all the details: https://github.com/expo/expo-cli/issues/213 – Salar Khan Nov 25 '18 at 22:08

3 Answers3

4

This issue has now been solved. They just published expo-cli@2.4.1 and uninstalling and reinstalling makes it work:

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

The issue was with a dependency of expo-cli 'joi' that was updated and broke stuff.

For more info: https://github.com/expo/expo-cli/issues/213

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Salar Khan
  • 457
  • 3
  • 13
2

You aren't missing anything here - there appears to be a problem with this version of expo-cli.

The github thread shared in the comments has more information and a possible workaround. https://github.com/expo/expo-cli/issues/213

If the workaround doesn't work for you, I would suggest using react-native-cli or simply waiting a day or two until the expo team fix this issue.

jmknoll
  • 1,046
  • 5
  • 11
  • 30
0

I've managed to fix this issue changing the ExpoCli version.

Looking good with expo-cli 2.2.5. You can use it until they fix the issue with the latest version.

  1. Uninstall expo-cli
  2. npm install -g expo-cli@2.2.5

After starting project all looks good. There is a new version of expo-cli available (2.4.0). You are currently using expo-cli 2.2.5 Run `npm install -g expo-cli` to get the latest version

TariqN
  • 668
  • 2
  • 9
  • 27