Search code examples
react-nativepackageexpo

Some dependencies are incompatible with the installed expo package version


Hello I am learning expo for react Native and while running my app i get the error below. My app runs fine but i just want to get rid of the error. is there something like npm update i can do to get rid of this error

here is the error:

Some dependencies are incompatible with the installed expo package version:

  • @react-native-picker/picker - expected version: 2.4.0 - actual version installed: 2.4.2
  • react-native-safe-area-context - expected version: 4.2.4 - actual version installed: 4.3.1
  • react-native-screens - expected version: ~3.11.1 - actual version installed: 3.13.1 Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo doctor --fix-dependencies, or install individual packages by running expo install [package-name ...]

Solution

  • actually this does the trick

    expo doctor --fix-dependencies
    

    2024 update:

    npx expo install --check
    

    -prompts you about packages that are installed incorrectly. It also prompts about installing these packages to their compatible versions locally. You can also use :

    npx expo install --fix
    

    read more https://docs.expo.dev/more/expo-cli/