Unable to resolve "../../App" from "node_modules\expo\AppEntry.js"
See original GitHub issueIn 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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:46 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I managed to get newest vue native to work.
In app.json add “sourceExts”: [ “js”, “json”, “ts”, “tsx”, “jsx”, “vue”] Inside “packagerOpts”
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)