getPrebuildConfig) is not a function

 expo-env-info 1.0.5 environment info:
      OS: macOS 12.5.1
      Shell: 5.8.1 - /bin/zsh
      Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v14.19.0/bin/yarn
      npm: 7.24.2 - ~/.nvm/versions/node/v14.19.0/bin/npm
      CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
      iOS SDK:
        Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
      Xcode: 14.1/14B47b - /usr/bin/xcodebuild
      expo: ^47.0.0 => 47.0.8 
      react: 18.1.0 => 18.1.0 
      react-dom: 18.1.0 => 18.1.0 
      react-native: 0.70.5 => 0.70.5 
      react-native-web: ~0.18.7 => 0.18.10 
      eas-cli: 3.0.0
      expo-cli: 6.0.8
    Expo Workflow: managed

warning Resolution field "@expo/config-plugins@5.0.5" is incompatible with requested version "@expo/config-plugins@4.0.7"
when running expo doctor there are so many warnings like this. How to get them to go away?

I can’t figure out why there are so many instances of old versions of @expo/config-plugins everywhere when in the package.json file it is only listed one. While trying to figure this out, I also added

"resolutions": {
    "@expo/config-plugins": "5.05",

but it doesn’t seem to help

This is the result I am getting on expo doctor, and my builds are failing during the prebuild phase

Expected package expo-modules-autolinking@~1.0.0
Found invalid:
  (for more info, run: npm why expo-modules-autolinking)
Expected package @expo/config-plugins@^5.0.5
Found invalid:
  (for more info, run: npm why @expo/config-plugins)
Expected package @expo/prebuild-config@^5.0.5
Found invalid:

when I run
eas build --platform ios --local --profile preview

The error on prebuild is:
(0 , _prebuildConfig(...).getPrebuildConfig) is not a function

I do not know if they are related but this is as far as I can get on the build process. :frowning:

Everything works great in the ios simulator.

Here is a link to the codebase.

Hi @siasjustin

First, uninstall expo-cli. You should not have that as a dependency of your app. It should be installed globally only.

Second, you’re using react-native-expo-cached-image which depends on an outdated version of @expo/config-plugins. In fact the project has been deprecated.

As a workaround you can try adding the following resolutions, but ideally you’d switch away from react-native-expo-cached-image to something else:

  "resolutions": {
    "@expo/config-plugins": "^5.0.2"

If you do that, expo-cli doctor will be happy.

In addition to the above, @react-native-community/masked-view has also been deprecated and you should replace it with @react-native-masked-view/masked-view instead.

None of the above is related to environment variables or secrets :slight_smile:

1 Like

Thank you! That did get me past this issue and is very helpful. Looks like I have too many drafts ready to go in this forum and I posted the question for one with the title for another lol. But thank you very much! Unfortunately I have new issues but hopefully I can get through them.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.