Repository navigation
ci: run wrangler through npx so the preview deploy survives pnpm 12 - #875
Merged
Merged
Conversation
pnpm 12 fails an install whose packages have ignored build scripts, and a `pnpm dlx` install runs outside the workspace, so the `allowBuilds` list in pnpm-workspace.yaml never reaches it. Every preview deploy since the pnpm 12 migration fails with ERR_PNPM_IGNORED_BUILDS on esbuild and workerd, which wrangler needs built. npx installs with npm, which has no such gate. Verified locally against pnpm 12.3.4: `pnpm dlx wrangler@4.90.1 --version` reproduces the CI error and `npx -y wrangler@4.90.1 --version` prints 4.90.1.
|
This branch was successfully deployed
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.
Which Linear task is linked to this PR?
None — CI infrastructure, found while checking the checks on #874.
Why was it implemented this way?
Every preview deploy has failed since #870 migrated the repo to pnpm 12:
pnpm 12 fails an install whose packages have ignored build scripts.
pnpm dlxinstalls into its own store outside the workspace, so theallowBuildslist inpnpm-workspace.yamlnever reaches it — and wrangler needsesbuildandworkerdbuilt. The deploy step is the onlypnpm dlxcall in the workflows;delete-test-app.yamltalks to the Cloudflare API directly and is unaffected.npxinstalls with npm, which has no build-script gate, and it is already how the Jumper fork resolved the same breakage after its own pnpm 12 migration.Alternatives considered
esbuild/workerdtoallowBuilds— does not help. The list lives inpnpm-workspace.yamland apnpm dlxinstall never reads it. It would also grant build scripts to the whole workspace to fix one throwaway CLI install.pnpm dlx --allow-build=esbuild,workerd— works, but pins the transitive build requirements of wrangler into our workflow. A wrangler bump that adds a third native dependency breaks the deploy again.Visual showcase (Screenshots or Videos)
n/a — no user-facing change.
Checklist before requesting a review
Testing
Reproduced locally against the repo's own pnpm 12.3.4, which reproduces the CI error byte for byte:
The deploy job is gated on the
testinglabel, so this PR carries it to exercise the changed step in CI.Note for #874
That PR's red
Publish to Cloudflare Pagesis this bug, not its own change. Once this merges, its merge ref picks up the fixed workflow and a re-run should go green — nothing to change there.