Vue Native installation failed with Vue Native CLI

1.4k views Asked by At

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
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

npm ERR! peer dep missing: [email protected], required by react- 
[email protected]
npm ERR! peer dep missing: react-native@^0.44.1, required by react- 
[email protected]

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.

1

There are 1 answers

1
user1785961 On

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