Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"

Ashley van Laer picture Ashley van Laer · Jul 25, 2019 · Viewed 7.4k times · Source

I am making a vue-native app with expo. when upgrading to expo version 33 I get the following error "Unable to resolve "../../App" from "node_modules/expo/AppEntry.js". The need to upgrade to version 33 is because I need the expo filesystem module.

I have already made a new project from scratch and the same error still occurs.

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^33.0.0",
    "global": "^4.4.0",
    "react": "16.8.3",
    "react-dom": "^16.8.6",
    "react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
    "react-native-cli": "^2.0.1",
    "react-native-web": "^0.11.4",
    "vue-native-core": "0.0.8",
    "vue-native-helper": "0.0.11"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0-0",
    "babel-preset-expo": "^5.1.1",
    "vue-native-scripts": "0.0.16"
  },
  "private": true
}

Answer

Alfred Young picture Alfred Young · Mar 18, 2020

I ran into this problem too. I used the expo cli to make the project which sets up your app.json file with "entryPoint": "node_modules/expo/AppEntry.js". AppEntry.js tries to default import from a js file called App in the root directory. Make sure you have a file called App.js|.tsx that default exports a react component.