chore(install): include desktop deps in root postinstall#1584
Merged
Conversation
CI's `npm ci` at the root only triggers `npm --prefix dashboard ci`, leaving `desktop/node_modules` empty. Vitest scans `desktop/src/**` for tests, so the first desktop test that imports a transitive dep (e.g. `react-markdown` via `Markdown.tsx`) fails to resolve in CI even though it passes locally for anyone who's ever run `npm install` inside `desktop/`. Unblocks #1562.
esengine
pushed a commit
that referenced
this pull request
May 24, 2026
#1584 wired `npm --prefix dashboard ci && npm --prefix desktop ci` into root `postinstall` to fix CI's missing workspace deps. But the published tarball ships only build artifacts under `dashboard/` (index.html, app.css, dist/) and no `desktop/` at all, so end-user `npx reasonix@0.50.0 code` failed during the dashboard `npm ci` and the bin never ran — the only visible output was npm's cleanup warnings on the half-extracted tree. Move the workspace install into `scripts/postinstall.mjs`, which exits 0 when `dashboard/package.json` is absent (i.e. when running from the tarball, not the repo). Ship the script via `files:`. Deprecate 0.50.0 on npm so existing installers see the warning.
esengine
pushed a commit
that referenced
this pull request
May 24, 2026
Node 18+ refuses to execFile `npm.cmd` directly on Windows (CVE-2024-27980 mitigation), throwing `spawnSync npm.cmd EINVAL`. Failed every Windows CI matrix entry on main after 0.50.1. `execSync` routes through cmd.exe / sh, matching what the original inline `&&`-chained postinstall did before #1584's regression. End-user installs of reasonix@0.50.1 are unaffected: postinstall short-circuits via the `dashboard/package.json` existence check before reaching the broken execFile call. Only repo checkouts at tag v0.50.1 hit the bug, which is dev-side only.
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
The root
postinstallonly runsnpm --prefix dashboard ci, leavingdesktop/node_modulesempty after a cleannpm ci. Vitest scansdesktop/src/**for tests, so the first desktop test that imports a transitive dep (react-markdownviaMarkdown.tsx) fails Vite resolution in CI — even though it passes locally for anyone who's ever runnpm installinsidedesktop/.Add
desktopto the same--ignore-scriptschain dashboard already uses.Unblocks #1562.
Test plan
npm --prefix desktop ci --ignore-scriptsworks against the existing lockfiledesktop/node_modules/react-markdownresolves after installnpm run verifygreen