Fix installed app crashing at startup: package zip.js - #6
Merged
Francy2009 merged 2 commits intoAug 10, 2026
Conversation
The 1.3.0 installers died on launch with ERR_MODULE_NOT_FOUND for 'app.asar/zip.js'. electron-builder's "files" field is an allowlist that named main.js, preload.cjs and latex.js one by one, so zip.js -- added in 1.3.0 and imported by main.js -- was never packaged. Running from source worked, which is why nothing caught it. The list now uses "*.js", so a new top-level module is included on its own rather than depending on someone remembering this file. Also adds verifica-pacchetto.mjs, run by CI and by the release workflow: it walks the main-process imports from main.js and preload.cjs and fails if any of them is missing from the built app.asar. The existing smoke test launches the app from the source directory, where every module is present by construction, so it could not see the gap between sources and package -- which is exactly how a broken installer got published.
The site still described a workflow that no longer exists. It told visitors to upload .tex files so "the backend compiles" and returns the results -- but the compiler was removed from the web in 1.2.0 and now lives only in the desktop app. The footer likewise credited an "Express backend" that today just serves these static pages. Content, rewritten around the app that actually ships: - what the three screens do, including the new one-ZIP-per-format download and the sandboxed HTML preview - how the LaTeX engine is found or installed: TinyTeX into the user's own folder with no admin rights, then 31 base packages and 19 TeX Live collections, and what is deliberately left out - the Pacchetti page mapped to the tlmgr commands behind it - every quizstruct command with its real signature, checked against the .sty, and what each one becomes in the PDF versus the HTML - when network access is needed, and that sources never leave the machine Design: system fonts only (no remote requests), serif headings, one green accent, and a dark palette via prefers-color-scheme. Dropped the emoji step icons, the 01-06 section counters, the decorative glow and the scroll-triggered fade-ins. The hero now shows one source fragment beside its two renderings, so the page demonstrates the product rather than asserting it. Tables replace card grids where the content is genuinely tabular. Verified in Chromium: no horizontal overflow at 12 widths from 320px to 1600px, light and dark, no console errors, one h1 with no skipped heading levels, working tabs and mobile menu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
Gli installer 1.3.0 morivano all'avvio:
Il campo
filesdi electron-builder è una allowlist e elencava i moduli uno per uno (main.js,preload.cjs,latex.js).zip.js, aggiunto in 1.3.0 per il download in ZIP e importato damain.js, non era nella lista: restava fuori dal pacchetto. Dai sorgenti l'app funzionava, quindi nulla se n'era accorto.Modifiche
filesusa ora*.js, così un nuovo modulo top-level è incluso da sé invece di dipendere dal ricordarsi di questo file.desktop/verifica-pacchetto.mjs: parte damain.jsepreload.cjs, segue gli import locali a cascata e fallisce se uno manca dall'app.asarcostruito. Usa@electron/asar, già presente con electron-builder.Lo smoke test esistente lancia l'app dalla cartella dei sorgenti, dove ogni modulo c'è per costruzione: non poteva vedere la differenza fra sorgenti e pacchetto, ed è esattamente così che un installer rotto è finito pubblicato.
Verifica
Build reale in locale (
electron-builder --linux --dir):app.asarora contienezip.jsaccanto amain.js,latex.js,preload.cjs,vendor/xvfbsenzaERR_MODULE_NOT_FOUND(prima terminava subito)app.asarda cui ho rimossozip.js: esce 1 conmoduli assenti da app.asar: zip.js— la guardia intercetta davvero il bug che ha causato questo problemaGenerated by Claude Code