'React Native: Android Emulator is not working after installing React Navigation

Whenever I install React Navigation packages and libraries and run android emulator it always causes an error.

enter image description here

enter image description here

and when I install all the "Error: Cannot find modules 'jsec'" Jsec, Jetify, Mime it will lead to error code:500

enter image description here

what's happening?

this is my package.json

{
  "name": "DesktabV1",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-navigation/bottom-tabs": "^6.3.1",
    "@react-navigation/drawer": "^6.4.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/native-stack": "^6.6.1",
    "@react-navigation/stack": "^6.2.1",
    "react": "17.0.2",
    "react-native": "0.68.1",
    "react-native-safe-area-context": "^4.2.4",
    "react-native-screens": "^3.13.1"
  },
  "devDependencies": {
    "@babel/core": "^7.17.9",
    "@babel/runtime": "^7.17.9",
    "@react-native-community/eslint-config": "^3.0.1",
    "babel-jest": "^27.5.1",
    "eslint": "^8.13.0",
    "jest": "^27.5.1",
    "metro-react-native-babel-preset": "^0.70.1",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source