fix(cicd): use npm ci so TW v4 oxide native binary resolves on Linux#152
Merged
Conversation
CI for the v0.5.0 prepare-release was failing in `Run tests` because @rocketicons/tailwind's integration test (`packages/tailwind/src/index.test.ts`) loads `@tailwindcss/postcss`, which loads `@tailwindcss/oxide`, which loads a per-platform native binary (`@tailwindcss/oxide-linux-x64-gnu` on the runner) declared as an optional dependency. `actions/cache` was restoring node_modules from a pre-TW-v4 cache via `restore-keys`, then `npm install` ran but didn't add the missing Linux variant — known npm bug npm/cli#4828. `npm ci` wipes node_modules and installs strictly from the lockfile (which already lists all platform variants), so the right binary lands every time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
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
Unblocks the v0.5.0 release pipeline. The
prepare-releaserun for #151 failed atRun testswith:Root cause
@rocketicons/tailwind's integration test loads@tailwindcss/postcss, which dynamically loads@tailwindcss/oxide, which in turn loads a per-platform native binary (@tailwindcss/oxide-linux-x64-gnuon the runner) declared asoptionalDependencies.Two factors compound:
actions/cachefornode_modulesusesrestore-keys: Linux-node-— so even when the exact dependency-hash key misses, it restores an older Linux cache (from before TW v4 was added) that has no oxide-linux binary.npm install(notnpm ci). With a partial-but-non-emptynode_modulesalready in place,npm installdoes NOT detect that the Linux platform variant of an optional dep is missing — that's npm/cli#4828.Result: tests fail at module-load with
Cannot find native binding.Fix
Replace
npm install→npm ciinprepare-release.yml.npm ci:node_modulesfirst (so partial restored caches don't poison the install)package-lock.json(which already records all platform variants — verified)Verified locally with
npm ci --dry-run— lockfile is in sync, no errors.Why minimal
Only changes one line + comment. Same
node_modulescache layer, sameactions/cache@v4setup, same dependency-hash key. No workflow restructuring.Test plan
prepare-releasere-runs against developrelease-notes.md, and uploads tag artifact