5

Created helloworld project refer to https://vue-native.io/docs/installation.html#Setup-with-Vue-Native-Cli

But has the error following as and my first application doesn't start.

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

My environment

$ node -v
v9.9.0
$ npm -v
6.4.1

$ npm list --depth=0
empty-project-template@ /Users/kamo/repo/github.com/kamontia/vue- 
native-app/helloworld
├── babel-preset-expo@5.0.0
├── expo@31.0.4
├── react@16.5.0
├── react-native@0.57.1
├── vue-native-core@0.0.8
├── vue-native-helper@0.0.9
└── vue-native-scripts@0.0.14

npm ERR! peer dep missing: react@16.0.0-alpha.6, required by react- 
native-reanimated@1.0.0-alpha.10
npm ERR! peer dep missing: react-native@^0.44.1, required by react- 
native-reanimated@1.0.0-alpha.10

On simulator,

Unable to resolve module ../../App from  
xxx/node_modules/expo/AppEntery.js: The ./../App could not be found 
from ...
Indeed, none of these files exist:
* ... App(.native||.ios.js|...

What should I do?

I also tried to create project with React Native refer to https://vue-native.io/docs/installation.html#Setup-with-React-Native, and success to start the application.

mentai
  • 123
  • 10

1 Answers1

1

Had a same issue. Below works for me

In app.json add

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



"packagerOpts": 
{ "sourceExts": [ "js", "json", "ts", "tsx", "jsx", "vue"],
 "config": "metro.config.js" }

From: https://github.com/GeekyAnts/vue-native-core/issues/117

This works for me

  • Thank you very much.! it works like a charm. It's very strange, why core devs of vue-native didnt add it from the box. – saike Aug 23 '19 at 16:26