question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

In console, I just run the following command: vue-native init <project name> And then, delete App.js file (App.vue file still exists)

npm list -g --depth=0

+-- @vue/cli@3.9.3
+-- @vue/cli-init@3.9.0
+-- create-react-native-app@2.0.2
+-- exp@57.2.1
+-- expo-cli@3.0.8
+-- node@11.4.0
+-- npm@6.10.0
+-- react-native-cli@2.0.1
+-- vue-native-cli@0.1.0
+-- webpack@4.29.6
`-- webpack-cli@3.3.0

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": "^34.0.1",
    "react": "16.8.3",
    "react-dom": "^16.8.6",
    "react-native": "https://github.com/expo/react-native/archive/sdk-34.0.0.tar.gz",
    "react-native-web": "^0.11.4",
    "vue-native-core": "^0.1.0",
    "vue-native-helper": "^0.1.0",
    "vue-native-scripts": "0.0.16"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "babel-preset-expo": "^6.0.0"
  },
  "private": true
}

Beacause I have problems with installation of vue-native-scripts v.0.1.0 (#182), I added them manually. vue-native-scripts@0.0.16 did not work correncly with RN v.0.59 (expo sdk 34)

In stack trace I see:

The module '../../App' could not be found from 'C:\\sample\\node_moudules\\expo\\AppEntry.js'. Indead, none of these files exist:
* 'C:\\sample\\App(.native||.android.expo.js|.native.expo.js|.expo.js|.android.expo.ts|.native.expo.ts|.expo.ts|.android.expo.tsx|.native.expo.tsx|.expo.tsx|.android.expo.json|.native.expo.json|.expo.json|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx

But why it’s don’t try to resolve module with vue extension?

metro.config.js

/**
 * Metro configuration for React Native
 * https://github.com/facebook/react-native
 *
 * @format
 */

const { getDefaultConfig } = require("metro-config");

module.exports = (async () => {
  const {
    resolver: { sourceExts }
  } = await getDefaultConfig();
  return {
    transformer: {
      babelTransformerPath: require.resolve("./vueTransformerPlugin.js"),
      getTransformOptions: async () => ({
        transform: {
          experimentalImportSupport: false,
          inlineRequires: false,
        },
      })
    },
    resolver: {
      sourceExts: [...sourceExts, "vue"]
    }
  };
})();

I spent about 3 days trying to solve this issue, but nothing found how to do this.

Repository

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:46 (5 by maintainers)

github_iconTop GitHub Comments

25reactions
Shrekiecommented, Aug 8, 2019

I managed to get newest vue native to work.

In app.json add “sourceExts”: [ “js”, “json”, “ts”, “tsx”, “jsx”, “vue”] Inside “packagerOpts”

image

7reactions
Wrufeshcommented, Aug 14, 2019

Simply adding sourceExts in packagerOpts doesnot solve the issue. Its very frustating. vue-native-cli (v-0.1.0) expo-cli (v-3…0.9)

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 - Stack Overflow
when upgrading to expo version 33 I get the following error "Unable to resolve "../../App" from "node_modules/expo/AppEntry.js". The need to ...
Read more >
Issues - GitHub
I've the expo-cli and the expo client app updated to the lastest version Error: Unable to resolve module `./node_modules\expo\AppEntry` from ...
Read more >
Cannot start app with error: node_modules/expo/AppEntry.js
I cannot run the app, just throw an error: node_modules/expo/AppEntry.js: Unexpected token '.', but I try to find in the AppEntry.js and ...
Read more >
Search - appsloveworld
[Solved]-Unable to resolve "../../App" from "node_modules/expo/AppEntry.js"-React Native. Search. score:-1. Accepted answer.
Read more >
unable to resolve module expo-constants - error react native
I'm try to run expo project on iOS. When I run command expo start , Metro bundle starts successfully but when I click...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found