Hotfix: dashboard Docker build needs @types/node#24
Merged
Conversation
The Docker `dashboard-build` stage installs ONLY the dashboard
workspace's deps and runs tsc --noEmit. Locally and in CI's validate
job the dashboard tsc walked UP from dashboard/node_modules to find
the root's @types/node — both workspaces share a parent filesystem.
Inside Docker, /app/dashboard/node_modules is in isolation and there
is no /app/node_modules to walk into, so playwright.config.ts and
the test files erupted with TS2591 ("Cannot find name 'process'")
and TS2304 ("Cannot find name 'global'").
The production deploy on main consequently failed at this exact step
right after the dev → main merge fired the Deploy workflow.
Fix:
- Add @types/node ^20 to dashboard devDependencies (matches the root
pin so the SDK version is identical).
- Add "node" to dashboard/tsconfig.json compilerOptions.types so the
explicit types list activates the new install.
Verified locally:
- npm --prefix dashboard run typecheck → clean
- npm --prefix dashboard run build → 330 KB / 98 KB gzipped, source maps emitted
- docker build --target dashboard-build → succeeds in isolation,
reproducing the prod deploy path
The dev branch's CI did not catch this because validate runs both
root + dashboard `npm ci` in the same workspace, so root's
@types/node was always reachable. Long-term gap: add a "build via
Docker" check on dev too. Tracked separately.
There was a problem hiding this comment.
Pull request overview
Fixes the dashboard’s isolated Docker build by explicitly including Node.js type definitions in the dashboard workspace, resolving TypeScript errors in playwright.config.ts and test files when @types/node isn’t available via hoisting.
Changes:
- Add
@types/nodetodashboarddevDependencies. - Include
"node"indashboard/tsconfig.json"types"so TS picks up Node globals/types during typecheck/build. - Update
dashboard/package-lock.jsonto lock@types/node(andundici-typesdependency).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| dashboard/tsconfig.json | Adds Node types to the TS type inclusion list for dashboard typechecking/build. |
| dashboard/package.json | Adds @types/node to dashboard devDependencies for isolated installs (Docker stage). |
| dashboard/package-lock.json | Locks the new @types/node dependency (and undici-types). |
Files not reviewed (1)
- dashboard/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pulkitpareek18
added a commit
that referenced
this pull request
May 15, 2026
…es (#24) The Docker `dashboard-build` stage installs ONLY the dashboard workspace's deps and runs tsc --noEmit. Locally and in CI's validate job the dashboard tsc walked UP from dashboard/node_modules to find the root's @types/node — both workspaces share a parent filesystem. Inside Docker, /app/dashboard/node_modules is in isolation and there is no /app/node_modules to walk into, so playwright.config.ts and the test files erupted with TS2591 ("Cannot find name 'process'") and TS2304 ("Cannot find name 'global'"). The production deploy on main consequently failed at this exact step right after the dev → main merge fired the Deploy workflow. Fix: - Add @types/node ^20 to dashboard devDependencies (matches the root pin so the SDK version is identical). - Add "node" to dashboard/tsconfig.json compilerOptions.types so the explicit types list activates the new install. Verified locally: - npm --prefix dashboard run typecheck → clean - npm --prefix dashboard run build → 330 KB / 98 KB gzipped, source maps emitted - docker build --target dashboard-build → succeeds in isolation, reproducing the prod deploy path The dev branch's CI did not catch this because validate runs both root + dashboard `npm ci` in the same workspace, so root's @types/node was always reachable. Long-term gap: add a "build via Docker" check on dev too. Tracked separately.
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.
The Deploy workflow on main failed at the Docker dashboard-build stage right after #22 merged. Inside Docker the dashboard workspace is built in isolation, so playwright.config.ts and the test files lost @types/node and tsc errored with TS2591 / TS2304.
This PR is the squashed PR-#22 changes' missing @types/node addition. Verified locally with
docker build --target dashboard-build --no-cachereproducing the prod path — passes.(Branched off main directly rather than dev because PR #22 was squash-merged and dev's old commits no longer apply cleanly.)