fix(ci): fix Windows smoke test build failures#792
Open
ahundt wants to merge 1 commit intoslopus:mainfrom
Open
fix(ci): fix Windows smoke test build failures#792ahundt wants to merge 1 commit intoslopus:mainfrom
ahundt wants to merge 1 commit intoslopus:mainfrom
Conversation
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
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.
Problem
Windows smoke test jobs fail during build with:
Root Cause
Two issues on Windows with Yarn 1.22:
npx tscpath resolution bug —npxresolvestscvia a double-nestednode_modules\node_modules\typescriptpath in a Yarn workspace context, which doesn't existyarn workspace @slopus/happy-wire buildfailsFix
packages/happy-wire/package.jsonandpackages/happy-cli/package.json:Replace
npx tscwithtscdirectly — matches the existingtypecheckscript which already usestscand works on all platforms. TypeScript is in devDependencies so yarn resolves it correctly without npx..github/workflows/cli-smoke-test.yml(Windows job only):SKIP_HAPPY_WIRE_BUILD=1duringyarn installto skip the broken postinstall on Windowscd packages/happy-wire && yarn buildstep after install so happy-coder can find happy-wire's dist filesLinux/macOS CI and local development are unaffected.
Changes
.github/workflows/cli-smoke-test.ymlpackages/happy-wire/package.jsonpackages/happy-cli/package.json