White Screen on Windows After Building React + Electron App (Works Fine on Ubuntu) #170167
Unanswered
RaoulBock
asked this question in
Programming Help
Replies: 1 comment
-
✅ ResolvedI finally tracked down the issue. The problem was in my Because the 🛠️ FixI updated the "files": [
"main.js",
"dist/**/*",
"public/**/*"
] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Body
Hi everyone 👋
I'm building a cross-platform desktop app called PulseDesk using React.js and Electron. The app runs flawlessly on Ubuntu Linux — the tray icon loads, the UI renders, and everything works as expected.
However, when I build the app for Windows using
electron-builderand run the generated.exe, the app installs successfully but opens to a white screen. No UI is visible, and the tray icon doesn't appear either.🛠️ Tech Stack:
❌ Issue
🔍 What I've Tried
main.jsandpreload.jsare included in the buildindex.htmlis being bundled correctly by WebpackwebPreferences: { devTools: true }— but nothing renders.exeas administrator📦
preload.js(relevant parts):📦
package.json(relevant parts):{ "name": "plus-desk", "version": "1.0.0", "main": "main.js", "scripts": { "start": "webpack && electron .", "pack": "webpack && electron-builder --dir", "dist": "webpack && electron-builder" }, "build": { "appId": "com.hello.world", "productName": "PulseDesk", "win": { "target": "nsis" }, "nsis": { "oneClick": false, "allowToChangeInstallationDirectory": true, "createDesktopShortcut": true, "createStartMenuShortcut": true, "shortcutName": "PulseDesk" }, "directories": { "buildResources": "public" }, "linux": { "target": "deb", "icon": "public/speedometer-256x256.png", "category": "Utility", "description": "PulseDesk is a real-time communication and productivity tool for teams." } }, "dependencies": { "axios": "^1.11.0", "react": "^19.1.1", "react-dom": "^19.1.1", "socket.io-client": "^4.8.1" }, "devDependencies": { "@babel/core": "^7.28.0", "@babel/preset-env": "^7.28.0", "@babel/preset-react": "^7.27.1", "babel-loader": "^10.0.0", "electron": "^37.2.5", "electron-builder": "^26.0.12", "html-webpack-plugin": "^5.6.3", "path-browserify": "^1.0.1", "webpack": "^5.101.0", "webpack-cli": "^6.0.1" } } ### Guidelines - [X] I have read and understood this category's [guidelines](https://github.com/orgs/community/discussions/51384) before making this post.Beta Was this translation helpful? Give feedback.
All reactions