4

I created a project a while back and tried running it recently and got an error from expo saying that my SDK version is not up to date. So I followed this answer (The experience you requested uses Expo SDK v(null), but this copy of Expo Client requires at least v23.0.0) to fix it. However now I'm running into a new error where my project cannot run and I get this error:

Could no connect to development server

What can I do to fix this? I don't want to try a hundred different solutions and accidentally lose my project forever and have to start over, so I figured I'd ask on here.

Here is my package.json:

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "axios": "^0.19.0",
    "expo": "^33.0.0",
    "firebase": "^6.5.0",
    "formik": "^1.5.8",
    "global": "^4.4.0",
    "native-base": "^2.12.1",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
    "react-native-elements": "^0.18.5",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-modal": "^11.3.1",
    "react-native-paper": "^2.16.0",
    "react-native-smart-carousel": "^1.1.0",
    "react-native-snap-carousel": "3.6.0",
    "react-native-vector-icons": "^6.6.0",
    "react-navigation": "^3.11.0",
    "styled-components": "^4.2.0",
    "truffle": "^5.0.34",
    "uuid": "^3.3.3",
    "web3": "0.19"
  },
  "devDependencies": {
    "babel-preset-expo": "^5.0.0"
  },
  "private": true
}

I ran expo-cli --version in my terminal and this is what I received:

3.0.4

Thank you

2
  • can you please post your package.json file also can you run on your terminal expo-cli --version what is the output?
    – Abdeen
    Oct 18, 2019 at 21:38
  • @AbdeenM. I just edited my post, thank you Oct 18, 2019 at 21:43

3 Answers 3

8

Please follow these steps:

  1. Run npm install -g expo-cli to install the latest Expo CLI globally.
  2. Close your Expo CLI server if you are using it.
  3. Make sure in app.json the sdkVersion is 33.0.0
  4. Change the react dependency in your package.json from 16.5.0 to 16.8.3
  5. Delete your project node_modules directory and package-lock.json file
  6. Run npm install or yarn install depending on your package manager.
  7. Run expo start -c to clear your cache and start your application.

Bonus

Now for any Expo based API or dependency you can install it by using expo install instead of npm install i.e. expo install @expo/vector-icons. This is better than using the traditional npm install or yarn install as it will install the version of the dependency that's compatible with your current Expo SDK.

Hope this Helps!

9
  • I am receiving this error now ENOENT: no such file or directory, scandir '/Users/me/Folder/MyProject/node_modules/@expo/vector-icons/fonts' Oct 18, 2019 at 22:45
  • Run this on your project directory expo install @expo/vector-icons that should do it :)
    – Abdeen
    Oct 18, 2019 at 22:48
  • I am sorry, but now I am getting this error: spawn yarnpkg ENOENT Set EXPO_DEBUG=true in your env to view the stack trace. Oct 18, 2019 at 22:58
  • what is your OS? do you use npm or yarn?
    – Abdeen
    Oct 18, 2019 at 23:01
  • my OS is 10.14.5 and I use npm Oct 18, 2019 at 23:02
1

The issue has to do with watchman & brew.

Follow these steps, by running:

  1. npm r -g watchman
  2. brew update && brew upgrade
  3. brew install --build-from-source [email protected] (Optional)
  4. brew install watchman

Make sure to run sudo if you are having permission issues.

0

What worked for me (and others) is to remove watchman (on Mac):

brew uninstall watchman

See also https://github.com/facebook/react-native/issues/29587#issuecomment-886284902

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.