fix(packaging): spawn Electron's node, relocate whisper, gitignore artifacts, drop unused dep#53
Merged
Merged
Conversation
…tifacts, drop unused dep Three things that "work in dev" but break a packaged build or dirty the repo: - Engine scripts were spawned as `node` from PATH with a repo-relative cwd; a packaged app has no system node. runScriptArgs now spawns process.execPath with ELECTRON_RUN_AS_NODE=1 (Electron's bundled node), and generate-llm.mjs's nested spawns use process.execPath too (they inherit the flag). - whisper.cpp + model installed into <repo>/.whisper — read-only in a packaged bundle and one `git add .` from being committed. transcribe.mjs now honors APERTURE_WHISPER_DIR (main points it at userData/whisper); .whisper/ is gitignored as the CLI fallback, alongside storybook-static. - Removed @remotion/transitions: declared but imported nowhere. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Audit roadmap Phase 5 (shippability). Three things that work in dev but break a packaged build or dirty the repo:
nodefrom PATH with a repo-relative cwd — a packaged app has no systemnode, so every Generate/Export/Transcribe would fail withspawn node ENOENT.runScriptArgsnow spawnsprocess.execPathwithELECTRON_RUN_AS_NODE=1(Electron's bundled Node), andgenerate-llm.mjs's nestedspawnSyncs useprocess.execPathtoo (they inherit the flag).<repo>/.whisper— read-only in a packaged bundle, and ~140 MB onegit add .from being committed.transcribe.mjsnow honorsAPERTURE_WHISPER_DIR(main points it atuserData/whisper);.whisper/is gitignored as the CLI fallback, alongsidestorybook-static.@remotion/transitions— declared inapp/package.jsonbut imported nowhere (verified acrossapp/src,app/scripts,packages/); dropped from the lockfile.Main-process + engine-script change — restart
npm run dev.Test plan
node --checkon the changed scripts; typecheck / lint / format / 101 tests / build green@remotion/transitionsabsent frompackage-lock.json, no source importsuserData/whisperMade with Cursor