简体   繁体   中英

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

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 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/

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 .

run this:

npm install -g expo-cli

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__\/.*/
];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM