CLI — nextop
Provided by the nextop-app package (bin/cli.js), exposed as the nextop binary.
nextop dev
- On Windows, kills any stray
electron.exe(taskkill /F /IM electron.exe /T). - Compiles the Electron layer:
tsc -p tsconfig.json. - Copies
electron/assets/**→dist/electron/assets. - Launches
electron .withNODE_ENV=development,NEXTOP_RUNTIME=true.
The Next server runs in dev mode (dev: true, dir: cwd) — HMR and fast refresh work.
nextop build
- Compiles the Electron layer (
tsc) + copies assets. next build(production.nextoutput).electron-builder→ distributable package inrelease/.
Packaging notes
asar: false— Next.js cannot read its files from inside an asar archive.electronlives indevDependencies(electron-builder requirement); productionnode_modules(includingnext) ship automatically.next.config.mjssetsimages.unoptimized: true— the read-only package can't write the image optimization cache.- On Windows, electron-builder's winCodeSign extraction needs symlink privilege → enable Developer Mode or run the terminal as Administrator.