Skip to content

fix(pack): add missing package.json fields for Linux AppImage build#2276

Merged
mrcfps merged 1 commit into
nexu-io:mainfrom
jetsung:main
May 22, 2026
Merged

fix(pack): add missing package.json fields for Linux AppImage build#2276
mrcfps merged 1 commit into
nexu-io:mainfrom
jetsung:main

Conversation

@jetsung

@jetsung jetsung commented May 19, 2026

Copy link
Copy Markdown
Contributor

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.

Fixes #

Why

Executing pnpm exec tools-pack linux build --to appimage failed because electron-builder could not find the repository field in the dynamically generated package.json. Additionally, it could not auto-detect the repository from .git/config due 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) in tools/pack/src/linux.ts.

What users will see

No user-facing changes. Developers can now successfully build Linux AppImage packages.

Surface area

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack / tools-pr flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

image

Bug fix verification

  • Command: pnpm exec tools-pack linux build --to appimage
  • Before: electron-builder crashes with Cannot read properties of null (reading 'provider').
  • After: Packaging completes successfully, and the .AppImage file is generated.

Validation

  • Verified pnpm exec tools-pack linux build --to appimage on a Linux environment.
  • Ran pnpm typecheck to ensure script integrity.

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.
@lefarcen lefarcen requested a review from PerishCode May 19, 2026 14:50
@lefarcen lefarcen added size/XS PR changes <20 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels May 19, 2026

@PerishCode PerishCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

@lefarcen lefarcen mentioned this pull request May 20, 2026
@mrcfps mrcfps merged commit 914c5b3 into nexu-io:main May 22, 2026
13 checks passed
@open-design-bot

Copy link
Copy Markdown
Contributor

🎉 📡 You just leveled up to Giotto

Giotto card for @jetsung

📡 ✨ Sending steady signals.

🙌 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

🔗 Share on X (English) · 分享到 X(中文)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/XS PR changes <20 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants