mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-09-02 01:20:23 +08:00
fix: resolve Electron startup failures on Windows and Linux
- Try legacy port (61337) first to preserve existing users' localStorage, fall back to 13370 which is below the Windows Hyper-V ephemeral range (#705) - Bind server and all URL references to 127.0.0.1 instead of localhost to fix IPv4/IPv6 mismatch on Linux (#684) - Add OS-assigned port fallback (port 0) so startup never throws - Log error codes in port checks for easier debugging - Update localhost guards in index.ts and window-manager.ts to also match 127.0.0.1 Related: #705, #684
This commit is contained in:
@@ -68,7 +68,7 @@ export async function startNextServer(): Promise<string> {
|
||||
const env: Record<string, string> = {
|
||||
NODE_ENV: "production",
|
||||
PORT: String(port),
|
||||
HOSTNAME: "localhost",
|
||||
HOSTNAME: "127.0.0.1",
|
||||
// Enable Node.js built-in proxy support for fetch (Node.js 24+)
|
||||
NODE_USE_ENV_PROXY: "1",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user