expo-electron-adapter
expo-electron-adapter copied to clipboard
Runtime error after using electron adapter
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
Is this after following all the documentation here? @kawasaki656 please provide all the information we ask for in the bug report template
@cruzach Yes, I setuped a project like written in the docs:
- electron adapter was installed with
yarn add -D @expo/electron-adapter
- electron was bootstraped with
yarn expo-electron
- electron-builder was installed with
yarn add -D electron-builder
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
I checked the web app but it has 2 errors. Maybe it's correct because I don't know exactrly which target webpack uses.
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.
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
?
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.
Same here... maybe related to https://github.com/expo/expo-cli/issues/1397