yesIamFaded
yesIamFaded

Reputation: 2068

Your project is in SDK version >= 33.0.0, but the expo package version seems to be older

I can't start my Expo app. I am getting this error:

Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
(0 , _config(...).fileExistsAsync) is not a function

It was working properly on Monday. My expo cli and sdk versions are 36.0.0, so the newest ones. Did anyone have this problem as well and knows a possible fix for this?

I am using an Android Studio Emulator.

Just ran expo upgrade and it told me that I am already using the newest versions but I ran it anyways and it ended with this:

ConfigUtils(...).resolveModule is not a function

Upvotes: 6

Views: 12115

Answers (4)

Ken
Ken

Reputation: 1404

run this:

npm install -g expo-cli

Upvotes: 1

rttss_sahil
rttss_sahil

Reputation: 253

The problem lies with both SDK and the Expo client version mis-match. Try doing this in the terminal with sudo and give the password:

sudo expo update <version>
sudo expo start

Do change <version with the latest or minimum version the error occured at. mine was 37.0.0

Happy to Help.🥰by RTTSS.

Upvotes: 2

yesIamFaded
yesIamFaded

Reputation: 2068

Alright I fixed it by myself. Even though I had the newest cli I had to upgrade it again and then I had to change the blacklist.js file located in node-modules/metro-config/src/defaults/blacklist.js to this:

    var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

Upvotes: -1

davidgamero
davidgamero

Reputation: 466

There are two possibilities: your global installation of the expo-cli package is outdated, or your expo package in the project itself is outdated.

To figure this out, run npm ls in your project directory and search for the expo version. If you're on a unix based system or have grep otherwise installed you can do this quickly with npm ls | grep expo.

If either of these show an expo package version less than 33.0.0 then you need to update the project's expo with expo update 35.0.0.

On the other hand, if the expo version in the project is above 33.0.0 then the global version needs an update, which can be fixed with npm install -g expo-cli

https://docs.expo.io/versions/latest/workflow/upgrading-expo-sdk-walkthrough/

Upvotes: 3

Related Questions