achorein/expo-share-intent

Expo Doctor warning about @expo/config-plugins@~8.0.0

davidcarboni opened this issue · 4 comments

Describe the bug
I'm seeing a warning when I run npx expo-doctor: Expected package @expo/config-plugins@~8.0.0 (found 7.9.2)

I ran yarn why @expo/config-plugins and got Hoisted from "expo-share-intent#expo-constants#@expo#config#@expo#config-plugins" so I'm wondering if perhaps the version of expo-constants needs updating?

Might not be an issue but I thought I'd mention it.

To Reproduce
My full command is:

yarn add expo@latest && yarn upgrade && npx expo install --fix && npx expo-doctor

Output is:

$ yarn add expo@latest && yarn upgrade && npx expo install --fix && npx expo-doctor
...
✖ Check that native modules use compatible support package versions for installed Expo SDK

Detailed check results:

Expected package @expo/config-plugins@~8.0.0
Found invalid:
  @expo/config-plugins@7.9.2
  @expo/config-plugins@7.9.2
  (for more info, run: npm why @expo/config-plugins)
Advice: Upgrade dependencies that are using the invalid package versions0.

One or more checks failed, indicating possible issues with the project.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ yarn why @expo/config-plugins
yarn why v1.22.22
warning ../../../package.json: No license field
[1/4] Why do we have the module "@expo/config-plugins"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@expo/config-plugins@8.0.4"
info Has been hoisted to "@expo/config-plugins"
info Reasons this module exists
   - Hoisted from "expo#@expo#config-plugins"
   - Hoisted from "@expo#config#@expo#config-plugins"
   - Hoisted from "expo#@expo#cli#@expo#config-plugins"
   - Hoisted from "expo-splash-screen#@expo#prebuild-config#@expo#config-plugins"
   - Hoisted from "expo#@expo#cli#@expo#prebuild-config#@expo#config-plugins"
info Disk size without dependencies: "1.73MB"
info Disk size with unique dependencies: "3.39MB"
info Disk size with transitive dependencies: "7.77MB"
info Number of shared dependencies: 47
=> Found "expo-share-intent#@expo/config-plugins@7.9.2"
info Reasons this module exists
   - "expo-share-intent" depends on it
   - Hoisted from "expo-share-intent#expo-constants#@expo#config#@expo#config-plugins"
info Disk size without dependencies: "1.75MB"
info Disk size with unique dependencies: "3.68MB"
info Disk size with transitive dependencies: "8.29MB"
info Number of shared dependencies: 56
=> Found "expo-linking#@expo/config-plugins@7.9.2"
info Reasons this module exists
   - "expo-share-intent#expo-linking#expo-constants#@expo#config" depends on it
   - Hoisted from "expo-share-intent#expo-linking#expo-constants#@expo#config#@expo#config-plugins"
info Disk size without dependencies: "2.03MB"
info Disk size with unique dependencies: "3.96MB"
info Disk size with transitive dependencies: "8.57MB"
info Number of shared dependencies: 56
Done in 0.61s.

Environment
give the output of the following command npx react-native info

info Fetching system and libraries information...
System:
  OS: Linux 6.8 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat)
  CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  Memory: 9.61 GB / 15.21 GB
  Shell:
    version: 5.2.21
    path: /bin/bash
Binaries:
  Node:
    version: 18.18.0
    path: ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.18.0/bin/yarn
  npm:
    version: 10.8.0
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
IDEs:
  Android Studio: Not Found
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.1
    wanted: 0.74.1
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Additional context
Add any other context about the problem here.

  • expo version (ex: 49) : ^51.0.8
  • using firebase : no
  • using static build : not sure (eas)
  • routing : react-navigation
  • package version (ex: 1.2.0) : ^2.0.0
  • platform target : Android & iOS
  • device : emulator & real devices
  • type: local expo-doctor

indeed an update of the plugin dependency is needed.

fixed in 2.0.1

I've upgraded to 2.0.1 but I'm still seeing the warning.

I've been looking more closely to see where it's coming from and I think it could be coming from expo-linking and expo-constants:

'''
=> Found "expo-share-intent#@expo/config#@expo/config-plugins@7.9.2"
info This module exists because "expo-share-intent#expo-constants#@expo#config" depends on it.
=> Found "expo-linking#@expo/config-plugins@7.9.2"
info Reasons this module exists

  • "expo-share-intent#expo-linking#expo-constants#@expo#config" depends on it
  • Hoisted from "expo-share-intent#expo-linking#expo-constants#@expo#config#@expo#config-plugins"
    '''

I've double-checked I'm definitely on 2.0.1 and that the package.json I have specified 8.0.0:

  "dependencies": {
    "@expo/config-plugins": "~8.0.0",
    "expo-constants": "~15.4.6",
    "expo-linking": "~6.2.2"
  },

Looking at npm it seems like expo-linking and expo-constants have updated versions so this might be why the version is being held back.

I've created a PR that updates these versions if this is helpful: #69

@davidcarboni sorry it's v2.1.0 not 2.0.1