Skip to content

fix(ci): fix Windows smoke test build failures#792

Open
ahundt wants to merge 1 commit intoslopus:mainfrom
ahundt:fix/windows-ci-build
Open

fix(ci): fix Windows smoke test build failures#792
ahundt wants to merge 1 commit intoslopus:mainfrom
ahundt:fix/windows-ci-build

Conversation

@ahundt
Copy link
Contributor

@ahundt ahundt commented Mar 1, 2026

Problem

Windows smoke test jobs fail during build with:

Error: Cannot find module 'D:\a\happy\happy\node_modules\node_modules\typescript\bin\tsc'

Root Cause

Two issues on Windows with Yarn 1.22:

  1. npx tsc path resolution bugnpx resolves tsc via a double-nested node_modules\node_modules\typescript path in a Yarn workspace context, which doesn't exist
  2. Postinstall CWD bug (Yarn 1.22, GitHub Issue #6175) — workspace postinstall scripts run from the wrong directory on Windows, so yarn workspace @slopus/happy-wire build fails

Fix

packages/happy-wire/package.json and packages/happy-cli/package.json:
Replace npx tsc with tsc directly — matches the existing typecheck script which already uses tsc and works on all platforms. TypeScript is in devDependencies so yarn resolves it correctly without npx.

.github/workflows/cli-smoke-test.yml (Windows job only):

  • Set SKIP_HAPPY_WIRE_BUILD=1 during yarn install to skip the broken postinstall on Windows
  • Add explicit cd packages/happy-wire && yarn build step after install so happy-coder can find happy-wire's dist files

Linux/macOS CI and local development are unaffected.

Changes

  • .github/workflows/cli-smoke-test.yml
  • packages/happy-wire/package.json
  • packages/happy-cli/package.json

Windows CI fails with:
  Cannot find module 'D:\a\happy\happy\node_modules\node_modules\typescript\bin\tsc'

Root cause: npx on Windows resolves tsc via a double-nested node_modules path in
Yarn 1.22 workspace context. The postinstall script also runs build scripts from
the wrong directory on Windows (Yarn 1.22 bug, GitHub Issue #6175).

Fix:
- packages/happy-wire/package.json: use 'tsc' directly instead of 'npx tsc'
  (matches existing 'typecheck' script which already works on all platforms)
- packages/happy-cli/package.json: same change for consistency
- .github/workflows/cli-smoke-test.yml (Windows job only):
  - SKIP_HAPPY_WIRE_BUILD=1 during install to skip broken postinstall on Windows
  - explicit 'cd packages/happy-wire && yarn build' step after install so
    happy-coder build can find happy-wire's dist files
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