Skip to content

fix(typecheck): keep the Remotion video project out of the root tsc run - #276

Merged
dachrisch merged 2 commits into
masterfrom
fix/typecheck-exclude-video
Nov 11, 2026
Merged

dachrisch merged 2 commits into
masterfrom
fix/typecheck-exclude-video

Conversation

@dachrisch

Copy link
Copy Markdown
Member

Problem

npm run typecheck fails on any PR that triggers the test workflow:

video/field-notes-ai-agent-os/src/scenes/Answer.tsx(2,30): error TS2307: Cannot find module 'remotion' or its corresponding type declarations.
… 19 times

video/field-notes-ai-agent-os is a standalone Remotion project with its own package.json, package-lock.json and tsconfig.json (include: ["src", "remotion.config.ts"]). CI runs npm ci at the root only, so remotion is never installed, and the root tsc --noEmit walks into video/** because that directory was never excluded.

This is pre-existing: the video commit (d5f247e) landed after the last src/** PR, and the deploy workflow on master only builds Astro, so nothing noticed.

Change

One line in tsconfig.json:

"exclude": ["video", "dist", "node_modules"]

video/ stays type-checked by its own config when someone works in it; the site build is unaffected (it never imports from video/, and the Docker build already excludes it).

Verification

  • before: npm run typecheck → 19 × TS2307, all under video/
  • after: npm run typecheck → clean (astro sync + tsc --noEmit)
  • npm run build → 44 pages

`video/field-notes-ai-agent-os` owns its package.json, package-lock and
tsconfig (include: src, remotion.config.ts) and is deliberately not part
of the Astro build. The root tsconfig never excluded it, so `tsc --noEmit`
walked into it and reported 19 x TS2307 "Cannot find module 'remotion'" on
any PR that triggers the test workflow, because those deps are only
installed inside video/. The last src-touching PR predates the video
commit, so the breakage stayed invisible until now.

Excluding video/ (and dist/, node_modules/) restores `npm run typecheck`
to clean without installing a second dependency tree in CI.
The type-check step is only trustworthy if a tsconfig change is actually
exercised. tsconfig.json was missing from both path filters, so a PR that
touched nothing else got no checks at all and could not satisfy the
required status check.
@dachrisch
dachrisch merged commit 92f38eb into master Nov 11, 2026
4 checks passed
@dachrisch
dachrisch deleted the fix/typecheck-exclude-video branch November 11, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant