dynamic import failing in react-native, throws "unknown module" error

118 Views Asked by At

I am attempting to use Reactotron and so I followed the quick start instructions found here: https://github.com/infinitered/reactotron/blob/master/docs/quick-start-react-native.md

however although I found this issue following this set of instructions I dont think it is related to Reactotron.

when I add an import() statatement in the App.js file of my react-native project i get the following warning/error:

enter image description here

I have ran npm install multiple times, updated my dependencies + packages,

here is a package list:

{
  "name": "my-app",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "1.18.2",
    "@react-navigation/bottom-tabs": "^6.5.9",
    "@react-navigation/drawer": "^6.6.4",
    "@react-navigation/elements": "^1.3.19",
    "@react-navigation/native": "^6.1.8",
    "@react-navigation/native-stack": "^6.9.14",
    "@react-navigation/stack": "^6.3.18",
    "@reduxjs/toolkit": "^1.9.6",
    "axios": "^1.5.1",
    "expo": "^49.0.13",
    "expo-checkbox": "~2.4.0",
    "expo-linear-gradient": "~12.3.0",
    "expo-status-bar": "~1.6.0",
    "react": "18.2.0",
    "react-native": "0.72.5",
    "react-native-gesture-handler": "~2.12.0",
    "react-native-paper": "^5.10.6",
    "react-native-reanimated": "~3.3.0",
    "react-native-safe-area-context": "4.6.3",
    "react-native-screens": "~3.22.0",
    "react-native-vector-icons": "^10.0.0",
    "react-redux": "^8.1.2",
    "url": "^0.11.3"
  },
  "devDependencies": {
    "@babel/core": "^7.23.0",
    "reactotron": "^0.9.0",
    "reactotron-react-native": "^5.0.3"
  },
  "private": true
}
0

There are 0 best solutions below