FAQ / Gotchas
- Why is the bundle/runtime heavy? Because a real Next.js server runs in-process — that's the feature, not a leak. You trade size for full Next.js fidelity.
- Can I use API routes / Server Actions? Yes — they run on the in-process server bound to
127.0.0.1. Add your own auth to anything sensitive. - Does
next/imagework? Yes, withimages.unoptimized: true(set in the template) because the packaged app is read-only. - My custom title-bar buttons show on the web build. Gate them behind
useWindow().isAvailable. useShelldoes nothing. It'smode: 'none'by default. Setshell.modeto'allowed'(+allowedCommands) or'all'inregisterNextOP.useSecureStore.setItemthrows. OS encryption isn't available (e.g. no Linux keyring). CheckisAvailable()first.- Windows packaging fails on symlink/winCodeSign. Enable Developer Mode or run the terminal as Administrator.
useDialog'sshowOpenDialog/showSaveDialogresolvenull. The user cancelled — this is not an error, just check fornullbefore using the result.useGlobalShortcut'sisRegisteredstaysfalse. The accelerator is already reserved by the OS or another app;globalShortcut.registerreturnedfalse. Pick a different accelerator.useTrayshows no icon / wrong icon. It defaults toelectron/assets/favicon.icorelative to the compiled main process — passoptions.iconwith an absolute path to override.useStorevsuseSecureStore.useStorenever encrypts (plaintext JSON on disk) — use it for settings/preferences, not tokens or secrets.