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

6

6

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
}
Aurelioaurelius answered 25/7, 2019 at 9:11 Comment(0)
T
-1

I solve the problem as downgrading Expo Sdk 33 to 32.

To downgrade expo sdk;

1- open app.json, change sdkVersion to "32.0.0" 2- open package.json, change the following dependencies

  {
  "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
  "expo": "^32.0.0",
  "react": "16.5.0"
   }

3- delete node_modules, install again via "npm install" command

Turpitude answered 31/7, 2019 at 14:9 Comment(0)
L
8

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.

Lustick answered 18/3, 2020 at 22:57 Comment(0)
B
3

In app.json add

"sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"]

Inside

"packagerOpts"

Image here

Baseburner answered 23/8, 2019 at 11:38 Comment(0)
M
1

In app.json add

"sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"]

link: https://github.com/GeekyAnts/vue-native-core/issues/183#issuecomment-519518412

Milore answered 23/2, 2020 at 8:57 Comment(0)
A
0

Make sure you have a "App.js" file in your apps folder, and make sure its not in any folder so the file path should be "/Users/USER/PROJECTNAME/App.js"

Auricula answered 4/11, 2020 at 20:13 Comment(0)
A
0

if you are using "expo-router", enter this in package.json

"main": "expo-router/entry"
Amparoampelopsis answered 15/5 at 22:45 Comment(0)
T
-1

I solve the problem as downgrading Expo Sdk 33 to 32.

To downgrade expo sdk;

1- open app.json, change sdkVersion to "32.0.0" 2- open package.json, change the following dependencies

  {
  "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
  "expo": "^32.0.0",
  "react": "16.5.0"
   }

3- delete node_modules, install again via "npm install" command

Turpitude answered 31/7, 2019 at 14:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.