expo: expo doctor fails on fresh install with SDK 45

Summary

expo doctor fails on a brand new app

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

45

Environment

  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 12.5
      Shell: 5.1.12 - /opt/homebrew/bin/bash
    Binaries:
      Node: 16.0.0 - ~/.asdf/installs/nodejs/16.0.0/bin/node
      Yarn: 1.22.17 - ~/.asdf/installs/nodejs/16.0.0/.npm/bin/yarn
      npm: 8.3.0 - ~/.asdf/plugins/nodejs/shims/npm
      Watchman: 2022.06.06.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.11.3 - ~/.asdf/shims/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    IDEs:
      Android Studio: 2021.2 AI-212.5712.43.2112.8609683
      Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~45.0.0 => 45.0.6
      react: 17.0.2 => 17.0.2
      react-dom: 17.0.2 => 17.0.2
      react-native: 0.68.2 => 0.68.2
      react-native-web: 0.17.7 => 0.17.7
    npmGlobalPackages:
      eas-cli: 0.46.0
      expo-cli: 6.0.1
    Expo Workflow: managed

Reproducible demo

$ npx create-expo-app my-app
$ cd my-app
$ expo doctor
Expected package @expo/config-plugins@^4.1.0
Found invalid:
  @expo/config-plugins@5.0.0
  (for more info, run: npm why @expo/config-plugins)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 9
  • Comments: 36 (6 by maintainers)

Most upvoted comments

Delete lock file and regenerate it, this will get solved

npm i expo@45.0.8 solved for me

when i run expo doctor, i got this output

Expected package @expo/config-plugins@~6.0.0 Found invalid: @expo/config-plugins@4.1.1 (for more info, run: npm why @expo/config-plugins)

and I have @expo/config-plugins@~6.0.0 in my package-json what can cause this

expo update solved it for me

Hi,

I add this to package.json

"resolutions": {
    "@expo/config-plugins": "^5.0.2",
    "@expo/prebuild-config": "~5.0.3",
    "expo-modules-autolinking": "~1.0.0"
  }

and remove node_modules and yarn.lock…then I rerun yarn and expo doctor.

I use expo 47.0.13 and node 16.16.0

it works for me.

@toddbauermeister I’ve tried this & it’s working
“resolutions”: { “@expo/config-plugins”: “~4.1.0”, “@expo/prebuild-config”: “~4.0.0”, “expo-modules-autolinking”: “0.9.0” },

$ npx create-expo-app my-app
$ cd my-app
$ rm package-lock.json
$ npm i
$ expo doctor
Expected package @expo/config-plugins@^4.1.0
Found invalid:
  @expo/config-plugins@5.0.0
  (for more info, run: npm why @expo/config-plugins)

That does not solve the expo doctor error.

we published new versions of packages that had a loose @expo/config-plugins version dependency and locked that dependency instead. this does not happen on new projects anymore, and existing projects can run expo doctor --fix-dependencies to install the latest version of these packages.

@Abelcor

So I found the plugin @react-native-voice/voice@3.2.4 that is causing issues, but its already up to date. Any suggestions on how to fix it

`├─┬ @react-native-voice/voice@3.2.4 │ └── @expo/config-plugins@2.0.4 ├─┬ expo-camera@12.5.0 │ └── @expo/config-plugins@5.0.4 ├─┬ expo-dev-client@1.3.1 │ ├── @expo/config-plugins@5.0.4 deduped │ ├─┬ expo-dev-launcher@1.3.1 │ │ └── @expo/config-plugins@5.0.4 deduped │ └─┬ expo-dev-menu@1.3.1 │ └── @expo/config-plugins@5.0.4 deduped ├─┬ expo-location@14.3.0 │ └── @expo/config-plugins@5.0.4 deduped ├─┬ expo-media-library@14.2.0 │ └── @expo/config-plugins@5.0.4 deduped └─┬ expo@46.0.20 ├─┬ @expo/cli@0.3.3 │ ├── @expo/config-plugins@5.0.4 deduped │ ├─┬ @expo/config@7.0.3 │ │ └── @expo/config-plugins@5.0.4 deduped │ ├─┬ @expo/metro-config@0.4.0 │ │ └─┬ @expo/config@7.0.1 │ │ └── @expo/config-plugins@5.0.4 deduped │ └─┬ @expo/prebuild-config@5.0.7 │ └── @expo/config-plugins@5.0.4 deduped └─┬ expo-file-system@14.1.0 └── @expo/config-plugins@5.0.4 deduped

`

Any assistance would be appreciated

I tried running expo doctor --fix-dependencies and I get the same issue as before complaining about invalid: @expo/config-plugins@5.0.0. I’m still using SDK 45, was I supposed to upgrade anything before retrying?

when i run expo doctor, i got this output

Expected package @expo/config-plugins@~6.0.0 Found invalid: @expo/config-plugins@4.1.1 (for more info, run: npm why @expo/config-plugins)

and I have @expo/config-plugins@~6.0.0 in my package-json what can cause this

@azeez-abp I have also received this error and then I did the following:

  1. Open terminal and navigate to project root folder
  2. Run npm ls @expo/config-plugins
  3. It should then show all packages dependant on it
  4. Find the plugin that depend on the old @expo/config-plugins@4.1.1 package
  5. Most of them should use the latest package, however, there was one plugin I needed to update that depended on the old package

same here

expo update solved it for me

@patrikmojzis’s solution worked for me

Steps

  1. open terminal or cmd and navigate to your project root
  2. Run npm update and wait for it to complete.
  3. Delete node_modules folder
  4. install your dependencies afresh. NB. I haven’t done any other configurations.Ensure @expo/config-plugins isn’t a dependency in your project i.e not available in package.json. expo-idk version is 47.0.11, @expo/config-plugins is 5.0.2.

@toddbauermeister I’ve tried this & it’s working “resolutions”: { “@expo/config-plugins”: “~4.1.0”, “@expo/prebuild-config”: “~4.0.0”, “expo-modules-autolinking”: “0.9.0” },

@kindthr This actually worked for me. I did try using resolutions but I did not know anything about the @expo/prebuild-config and expo-modules-autolinking packages. Thanks!

I have the same issue. In my case it’s due to expo-updates. I tried to re-install expo-updates with expo install but it didn’t solve the wrong dependency. Does anyone know how to fix it?

node_modules/expo-updates/node_modules/@expo/metro-config/node_modules/@expo/config-plugins

In my case I was using "jest-expo": "^47.0.1", somewhere in my workspace which was causing the issue. Downgrading it to 45 fixed it (found the issue with npm why @expo/config-plugins)

same problem for me, any help?

Same problem for me: image I guess I have to downgrade firebase? But how would I know which older version of firebase depends on the correct version of @expo/config-plugins?

Anyone tried anything else that worked? I’m on Expo45 and using Yarn and can’t get this fixed 😅

Also does anyone know what kinds of practical issues this causes within projects, like what actually breaks because of this bug?

@ayaanqui Delete the node_modules folder and package-loc.json and run expo doctor --fix-dependencies again. That worked for me

We’re seeing this error as well. Here’s the output of npm ls @expo/config-plugins

$ npm ls @expo/config-plugins
[project]
├─┬ @config-plugins/react-native-branch@0.0.1
│ └── @expo/config-plugins@4.1.5
├─┬ @react-native-google-signin/google-signin@7.2.2
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-apple-authentication@4.2.1
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-av@11.2.3
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-constants@13.1.1
│ └─┬ @expo/config@6.0.26
│   └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-dev-client@1.0.1
│ ├── @expo/config-plugins@4.1.5 deduped
│ ├─┬ expo-dev-launcher@1.0.1
│ │ └── @expo/config-plugins@4.1.5 deduped
│ └─┬ expo-dev-menu@1.0.1
│   └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-facebook@12.2.0
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-image-picker@13.1.1
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-notifications@0.15.4
│ └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-splash-screen@0.15.1
│ └─┬ @expo/prebuild-config@4.0.4
│   └── @expo/config-plugins@4.1.5 deduped
├─┬ expo-updates@0.13.3
│ ├── @expo/config-plugins@4.1.5 deduped
│ └─┬ @expo/metro-config@0.3.21
│   └─┬ @expo/config@7.0.0
│     └── @expo/config-plugins@5.0.0    [Note: This is the only 5.0.0]
├─┬ expo@45.0.6
│ ├─┬ @expo/cli@0.1.5
│ │ └── @expo/config-plugins@4.1.5 deduped
│ └─┬ expo-file-system@14.0.0
│   └── @expo/config-plugins@4.1.5 deduped
└─┬ sentry-expo@4.2.0
  └── @expo/config-plugins@4.1.5 deduped