fix(dot deploy): always install before build, surface build errors clearly#192
Merged
UtkarshBhardwaj007 merged 1 commit intoMay 20, 2026
Merged
Conversation
…early
`detectInstallConfig` previously short-circuited when a `node_modules/`
directory existed at the project root. A stale `node_modules/` left over
from a branch switch or lockfile bump bypassed that guard and let Vite
build against package versions that didn't match the lockfile, producing
opaque "X is not exported by Y" errors. Install unconditionally so
pnpm/yarn/npm can reconcile (idempotent ~1s no-op when in sync). Drops
the now-dead `hasNodeModules` field from `DetectInput`.
Also fixes two CLI bugs that compounded the problem when a build did fail:
- `runStreamed` only kept the last 10 lines of build output in the
rejection message. Vite/Rollup print the actual error followed by a
10–20 line stack trace, so the slice consistently dropped the
message and showed only the trace. Widen the snippet to the full
40-line tail buffer.
- `DeployScreen`'s frontend / contracts / playground rows each set
`value={state.error}` while the screen-level "deploy failed" row at
the bottom rendered the same message a second time. Worse, the
frontend's `upload + dotns` row showed the error even when it was
the `build` step that failed. Drop the in-section error text so the
`✕` mark indicates which step failed and the bottom row carries the
message once.
Adds a Vite-shaped regression test to `process.test.ts` ensuring an
"error message + long stack trace" output preserves the message
end-to-end.
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
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
detectInstallConfigpreviously skippedpnpm install(or PM equivalent) whennode_modules/already existed. A stalenode_modules/from a branch switch or lockfile bump bypassed that guard and let Vite build against package versions that didn't match the lockfile, producing opaque"X is not exported by Y"errors. We now install unconditionally so the PM can reconcile — idempotent (~1s no-op) when in sync.runStreamedkept only the last 10 lines of output in its rejection message. Vite/Rollup print the meaningful error first and then a 10–20 line stack trace, so the slice consistently dropped the message. Widened to the full 40-line tail buffer.DeployScreen's per-section rows each setvalue={state.error}while the screen-level "deploy failed" row rendered the same message a second time, and the frontend'supload + dotnsrow showed the error even when it was thebuildstep that failed. Dropped the in-section error text; the✕mark indicates which step failed and the bottom row carries the message once.Test plan
pnpm format:check && pnpm lint:license && pnpm build && pnpm test— green locally (547 tests)dot deployagainst a project with a stalenode_modules/(e.g. checked out before a lockfile bump, no manualpnpm i) reconciles dependencies and builds successfully instead of failing with an opaque export errorFormat,Lint, build, unit + e2e) pass