asadadams / simple-electron-react-boilerplate

Simple and minimal Electron + React Boilerplate
4 stars 0 forks source link

electron build blank #5

Closed xGodThunder closed 4 years ago

xGodThunder commented 4 years ago

Hey buddy, When I build my pack, the app displays a blank page. (see image for reference: https://pasteboard.co/J3pokGZ.png ). I don't see any console errors, ut electron app won't able to find out index.html and other assets.

When I run dist/ files directly in the browser then it throws "require is not a function" error.

I am using npm run package for the build.

Any suggestion would be really appreciated :)

xGodThunder commented 4 years ago

https://github.com/xGodThunder/ultimate-downlaoder

check my repo if it is required.

xGodThunder commented 4 years ago

i made it working, it i because of this let dev = false; if (process.defaultApp || /[\\/]electron-prebuilt[\\/]/.test(process.execPath) || /[\\/]electron[\\/]/.test(process.execPath)) { dev = true; }

Any suggestions about how to dev=false while packaging?

asadadams commented 4 years ago

First run npm run dev and in another console run npm run start

xGodThunder commented 4 years ago

I guess there is not start script. it's complaining about it.

asadadams commented 4 years ago

There is a start command though. But in case that is not working run electron .

asadadams commented 4 years ago

@xGodThunder I hope you have solved your issue so closing this issue