fix(pack): add missing package.json fields for Linux AppImage build#2276
Conversation
Fix electron-builder failure in `pnpm exec tools-pack linux build --to appimage` by adding required description, author, and repository fields to generated package.json in tools/pack/src/linux.ts.
PerishCode
left a comment
There was a problem hiding this comment.
@jetsung Nice, narrowly-scoped fix — populating description, author, and repository on the synthesized package.json is exactly what electron-builder needs to stop crashing on provider when the assembled app lives outside the git working tree. The description text matches the root package.json and the repo URL is correct, so the AppImage build path now has a self-contained metadata source. Thanks for tracking down the root cause (auto-detection from .git/config failing in the isolated assembly dir) and including the validation command in the PR body — clean change, happy to ship. 🚀
🔁 Powered by Looper · runner=reviewer · agent=claude-code · An autonomous AI dev team for your GitHub repos.
🎉 📡 You just leveled up to Giotto
🙌 Your contributions are sending a clear signal across the network: you care about making Open Design better. Keep transmitting. 💛 Thanks for helping Open Design move forward. Keep building in the open. 🚀 📊 Rank #196 among 100+ contributors |

Fix electron-builder failure in
pnpm exec tools-pack linux build --to appimageby adding required description, author, and repository fields to generated package.json in tools/pack/src/linux.ts.Fixes #
Why
Executing
pnpm exec tools-pack linux build --to appimagefailed becauseelectron-buildercould not find therepositoryfield in the dynamically generatedpackage.json. Additionally, it could not auto-detect the repository from.git/configdue to running within an isolated assembly directory. This resulted in a crash:TypeError: Cannot read properties of null (reading 'provider').This PR fixes the Linux AppImage build by populating the required metadata (
description,author,repository) intools/pack/src/linux.ts.What users will see
No user-facing changes. Developers can now successfully build Linux AppImage packages.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-pack/tools-prflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
Bug fix verification
pnpm exec tools-pack linux build --to appimageelectron-buildercrashes withCannot read properties of null (reading 'provider')..AppImagefile is generated.Validation
pnpm exec tools-pack linux build --to appimageon a Linux environment.pnpm typecheckto ensure script integrity.