Open Forsyth-Creations opened 2 months ago
I think this may be issue let myPath = path.join(__dirname, '../');
as that'll work in development, but in production, I think you need to use app.getAppPath()
to point at the file
https://www.electronjs.org/docs/latest/api/app/#appgetapppath
electron-builder: 25.0.5:
Node: 22.6.0:
Electron: 32.0.2:
N/A
Building: main.js:
I'm working on a NextJS application, but I'm doing something out of the ordinary: instead of building the static site, I'm trying to use NextJS to serve the frontend at a random port and then allow Electron to access that page. Whenever I package it up with the builder (On Windows) all the files are in the app.asar as I'd expect but the application fails to find the .next folder. Running main.js locally though Electron has no such error, so I assume this has something to do with how I'm packaging it with the builder or NextJS. I've included pertinent files in this post, please let me know if I'm missing something!
CodeSegments.zip