saltyshiomix / nextron

⚡ Next.js + Electron ⚡
https://npm.im/nextron
MIT License
3.97k stars 229 forks source link

Build from Example not Working #335

Closed Charles808 closed 1 year ago

Charles808 commented 1 year ago

I have a project made using nextron. After build using the command for windows, it created dist folder and there is exe there. Weirdly, after run it. Only white screen shows.

I tried many things and googled but no solution working.

So, I decided to use the basic example from here https://github.com/saltyshiomix/nextron/tree/main/examples/with-tailwindcss

And build using run: "build:win64": "nextron build --win --x64",

Unexpectedly, even without changing anything the example also have same problem.

It runs okay using "npm run dev" But it is only white screen, after running exe produced by "npm run build:win64"

Something missing here ?

Charles808 commented 1 year ago

More info :

npx electron-builder • loaded configuration file=C:\Workspace\Royhills\Sample\my-app\electron-builder.yml • writing effective config file=dist\builder-effective-config.yaml • packaging platform=win32 arch=x64 electron=21.4.3 appOutDir=dist\win-unpacked • building target=nsis file=dist\My Nextron App Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false • building block map blockMapFile=dist\My Nextron App Setup 1.0.0.exe.blockmap

npm run nextron --version 7.11.1

Charles808 commented 1 year ago

I got it solved The problem here is the NODE_ENV variable is not set yet Therefore in background.ts the isProd variable always false and build with wrong parameter.