Skip to content

fix(dsh-runtime): add prepare script so git installs build dist - #7475

Open
VedantMadane wants to merge 1 commit into
nexu-io:mainfrom
VedantMadane:fix/dsh-runtime-prepare-git-install
Open

fix(dsh-runtime): add prepare script so git installs build dist#7475
VedantMadane wants to merge 1 commit into
nexu-io:mainfrom
VedantMadane:fix/dsh-runtime-prepare-git-install

Conversation

@VedantMadane

Copy link
Copy Markdown

Fixes #7471

Why

Installing @open-design/dsh-runtime as a git dependency (github:nexu-io/open-design#path:packages/dsh-runtime) leaves main / exports pointing at dist/*.js that were never built. pnpm runs a git dependency's prepare hook at install time, but this package only declared build — so install completed with no dist/, and DSH Desktop then hard-failed the whole plugin tree (atomic loader) with ERR_MODULE_NOT_FOUND for dist/startup.js and dist/index.js.

Hit this while wiring the package into a DeepSeek Harness profile via git; there is still no npm publish fallback.

What users will see

  • Git / path installs of @open-design/dsh-runtime produce a package whose declared entry points exist (dist/ built during install via prepare).
  • DSH Desktop (and other consumers) can load open-design-runtime / open-design-startup without ERR_MODULE_NOT_FOUND from a missing build.

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 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
  • Default behavior change - changes what existing users experience without opting in
  • None - internal packaging fix only (packages/dsh-runtime/package.json scripts)

Screenshots

N/A

Bug fix verification

Validation

  • Inspected packages/dsh-runtime/package.json before/after; single-line scripts change only.
  • Did not run full monorepo pnpm install / pnpm guard in this environment (sparse checkout of packages/dsh-runtime only; disk-constrained). Change is additive lifecycle wiring over the existing build script.

Git consumers (e.g. pnpm add github:nexu-io/open-design#path:packages/dsh-runtime)
never ran build, so main/exports pointed at missing dist files and DSH Desktop
failed the whole plugin tree at startup.

Fixes nexu-io#7471

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
@lefarcen

Copy link
Copy Markdown
Contributor

Thanks @VedantMadane — the #7471 packaging failure is easy to map from your write-up. I've routed this for review and linked it back to the issue so it doesn't get lost.

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

The git-install path still needs a packaging change that avoids preparing the whole monorepo. I reproduced the exact dependency install at this commit and the new hook expands into repository-wide installation work before this package can build.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

}
},
"scripts": {
"prepare": "pnpm run build",

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.

Avoid using prepare on this package while it is consumed from a subdirectory of the monorepo. With pnpm 10.33.2, an exact install of github:nexu-io/open-design#84c90101165ab75081d36b67dde4d8e00d865d8d&path:packages/dsh-runtime first fails unless the consumer allowlists this script; after allowlisting it, pnpm runs pnpm install against the fetched repository workspace. The reproduction selected all 29 workspace projects and installed 1,292 packages, then ran unrelated native postinstalls including onnxruntime-node; the runtime build had still not started after several minutes. This turns a small plugin dependency into a full repository/native-toolchain installation, so it can fail on the same constrained consumer environments this PR is intended to fix and executes much more third-party install code than the package requires. Please ship a self-contained prebuilt package instead (for example, publish/consume the existing packed artifact with dist, or provide an equivalent repository artifact that does not need a git prepare), and add an install-level regression that imports both the root and ./startup exports from that artifact.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

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.

@open-design/dsh-runtime: git installs are broken — no prepare script, dist never built, sources stripped by files field

3 participants