vue-native-core: npm run web fails
I’m trying to run my app using the web variant. I’m getting this error when the app spins up. Ive tried to look through the expo-cli package to see if I could find anything and came up empty. I’m guessing that i’m missing a config somewhere.
Failed to compile.
C:/Users/smplman/AppData/Roaming/npm/node_modules/expo-cli/node_modules/react-dev-utils/webpackHotDevClient.js
Error: Failed to load config "universe/node" to extend from.
Referenced from: BaseConfig
at _normalizeObjectConfigDataBody.next (<anonymous>)
at _normalizeObjectConfigData.next (<anonymous>)
Here is how I setup my app
vue-native init test-app
cd test-app
npm run web
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 16
- Comments: 27 (3 by maintainers)
@icarter09 I blew away my test app, downgraded expo-cli and re ran vue-native init. After that I renamed app.json to App.json. Here is the error i’m getting now.
Same issue, can’t run npm run web
Hey guys. The Vue Native team is a bit occupied with other things at the moment and this issue has been put on hold for now. Sorry that an update took so long.
On iOS and Android, Metro is the only component required in the JS build pipeline. We have a custom transformer (in vue-native-scripts) which Metro uses to convert
.vuefiles into equivalent React Native code, which then effectively gets piped into the default Babel transformer used by Metro (for.js) files.On web, though, Webpack needs to be used for intermediate transformations so that the code can run on web. Metro is used here too, but not for the transformation.
From my findings, the Expo Webpack config uses the babel-loader for handling
.jsfiles. So we’d probably need a custom Webpack loader for.vuefiles (or maybe some other mechanism which can do the job). My guess is that the transformer exported byvue-native-scriptswould help in making a loader. But the loader needs to meet the Webpack loader API requirements and exposeraw,pitchetc. as described here. We haven’t worked out the details of the implementation yet.The above findings were also specifically for Expo, but once that’s working, it should be possible to adapt it to bare React Native apps.
We could use your help or thoughts on this. In any case, it might be a while before web is supported.
Long story short, at the time, vue-native-cli does not work using web, only android and iOS.
Would really love to have this resolved so that the vue-native-cli can also be ran as a web app. Without this functionality, it is better just to use react-native and avoid vue-native-cli. This is a big deal for ease of development and should be addressed as soon as possible. Developers here have been complaining about this issue since the end of last year, and even though the geekyants devs are looking and closing issues pertaining to this(one being 3 days ago), we have no timeline of when it will be fixed.
I got similar output from a expo/react project when trying to spin up a web variant to. File that failed to compile was at /c/Users/{me}/sites/{project-name}/node_modules/expo/AppEntry.js
I’m moving this issue back to core, since it is concerned with
vue-native-scriptsThis seems to be happening because AppEntry.js tries to import
../../App. The default packager configuration specifies.jsonas a valid file extension. For some reason, in web, Expo seems to be looking for App.json and ignores App.vue. I’ll need to have a closer look.Anybody have solution for this, i am facing same issu like@smp4488
Still no solution to this? What a bummer.