Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

.exe for production #3670

Open
Open
Labels
@azixcodes

Description

@azixcodes

I am using this approach for creating and exe for my react app, since the app is pretty big, but when I run the react server and run this commandnpx electron it's working just fine, but when I build the entire app using electron-builder, it creates the build files and .exe for me, but when I try to open the .exe file the UI does'nt render.

I did the same steps for a brand new react app which is working just fine, but with my primary react app the exe is not rendering the UI.
I can only see the CSS get loaded, because the main window bg color is the one I used in my app.

this is the main.js file I am using
`const { app, BrowserWindow } = require("electron");
const fs = require("fs");
const path = require("path");
let win;

app.whenReady().then(() => {
win = new BrowserWindow({
height: 800,
width: 1000,
});
if (app.isPackaged) {
win.loadFile("./gui/build/index.html");
} else {
win.loadURL("http://localhost:3000");
}
});
process.on("uncaughtException", (err) => {
const logPath = path.join(__dirname, "error.log");
fs.appendFileSync(logPath,${new Date()}: ${err.stack}\n);
});
`

Looking forward for your assist. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp