Repository navigation
Force npm for wrangler-action's own install, not pnpm auto-detect - #15
Merged
Merged
Conversation
promote and rollback both fail today: "Error: Unable to locate executable file: pnpm". Neither job runs setup-app/pnpm — they only shift Cloudflare traffic on an already-built version, no app build needed — but wrangler-action's own wrangler install (triggered by passing wranglerVersion) auto-detects the package manager from the checked-out repo's lockfile, finds pnpm-lock.yaml, and tries to run pnpm, which was never installed on this runner. Pin packageManager: npm on both wrangler-action steps so the install no longer depends on incidental lockfile presence. actions/deploy-app hits the same wrangler-action code path but isn't affected in practice — it always runs after setup-app's pnpm install for the app build — left alone here to keep this fix minimal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QZs3qvSwpTvBZEPSqfXQzQ
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.
This is blocking production promotion right now
promote-production.yml'sShift Production Trafficstep is failing on apps-invest:Root cause
Neither
promote(app-promote-production.yml) norrollback(app-rollback.yml) runsetup-app/pnpm — they only shift Cloudflare traffic on an already-built version, no app build needed. Butcloudflare/wrangler-action, when givenwranglerVersion, does its own internal wrangler install and auto-detects the package manager from whatever lockfile sits in the checked-out working directory. Both jobs check out the full app repo tree (for the release-tag content / on-main ancestry check), which includespnpm-lock.yaml— so the action decides to install wrangler viapnpm, which was never set up on that runner.This has been live since the
promote/rollbacksplit was introduced; it just hadn't been exercised until today's real promotion attempts.Fix
Pin
packageManager: npmon both wrangler-action steps, so the install no longer depends on incidental lockfile presence in the checkout.actions/deploy-apphits the identicalwrangler-actioncode path but isn't broken in practice — every caller of it runs aftersetup-app's pnpm install (for the actual app build), so pnpm is genuinely on PATH there. Left it untouched to keep this fix minimal to the two jobs that are actually broken; happy to harden it too in a follow-up if preferred.Verification
yamllintclean on both files.wrangler-action's own install behavior (triggered by thewranglerVersioninput) against the exact log sequence reported:🔍 Checking for existing Wrangler installation→📦 Installing Wrangler→ the pnpm error — matches this failure mode precisely.🤖 Generated with Claude Code
Generated by Claude Code