expo / expo-electron-adapter

This package wraps `electron-webpack` and adds support for Expo web and other universal React packages.
MIT License
29 stars 11 forks source link

Runtime error after using electron adapter #6

Open kawasaki656 opened 4 years ago

kawasaki656 commented 4 years ago

Steps to reproduce: yarn install yarn electron-webpack yarn electron-builder --dir -c.compression=store -c.mac.identity=null

Project: https://github.com/okasato/test-electron-expo-react-native After running executable file I get the folowing error: SyntaxError: Unexpected string image

cruzach commented 4 years ago

Is this after following all the documentation here? @kawasaki656 please provide all the information we ask for in the bug report template

kawasaki656 commented 4 years ago

@cruzach Yes, I setuped a project like written in the docs:

After that I have webpack config electron-webpack.js and I tried to package an app with yarn electron-webpack. I get a target in dist folder image I checked the web app but it has 2 errors. Maybe it's correct because I don't know exactrly which target webpack uses. image After that I tried to package it to executable file with yarn electron-builder --dir -c.compression=store -c.mac.identity=null I got an app but got an error which I mentioned in issue when I run it. Where I was wrong ? Pls let me know.

kawasaki656 commented 4 years ago

And do I need to change main attribute in package.json ? I keep it as in repository node_modules/expo/AppEntry.js Maybe it needs to replace with dist/main/main.js or dist/renderer/renderer.js ?

pbgodwin commented 4 years ago

I hate to add a +1 to this thread, but I’ve recently stumbled across this issue while setting up my CI/CD pipeline.

My repro looks largely the same as OP; the project runs fine under a debugger, but the built artifacts give a runtime error. This is with a fresh expo project.

JulianSolros commented 3 years ago

Same here... maybe related to https://github.com/expo/expo-cli/issues/1397