DEV Community

Discussion on: Making Desktop apps with Electron, React Native, and Expo

wernancheta profile image
Wern Ancheta • Edited on

Thanks for writing this guide!
I tried creating a demo app with it and it works in development mode.

The only problem is that the build doesn't seem to work.
I'm getting this error when compiling in mac:

electron expo error

I used the following command to compile: yarn electron-webpack && yarn electron-builder --dir -c.compression=store -c.mac.identity=null

There were no errors in the compilation process. My babel.config.js looks like:

module.exports = function(api) {
  return {
    presets: ['babel-preset-expo', 'module:metro-react-native-babel-preset', 'module:react-native-dotenv'], 
Enter fullscreen mode Exit fullscreen mode

any ideas why this is? does babel-preset-expo support global module imports?

again, thank you for this. I'll continue trying to figure out what's wrong.

varmab profile image
Varma Bhupatiraju

@Wern, I have same issue. Did you find any solutions?

aloaks profile image
Alberto Robles

Hi, there.

I'm getting a similar error. I've been trying to fix it by changing the syntax for that line from 'import from ...' to 'require('....')'.

It "worked" in the way that the error moved to the next "import" statement.
Is ES6 not working on the build?

Tried using other babel presets (babel/env, babel-react, etc...). With these ones, not even the building finishes.

Can't find any solution

meedwire profile image
Leonardo Silva

Any answer on the subject, I have the same problem, a build example would be welcome.