Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vue Native installation failed with Vue Native CLI

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.

like image 725
mentai Avatar asked Nov 07 '22 00:11

mentai


1 Answers

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

like image 148
user1785961 Avatar answered Nov 14 '22 22:11

user1785961