Repository navigation
fix(deploy): move patch-package to dependencies (unbreaks tutorials-srv staging) - #3108
Merged
Merged
Conversation
…es prod prune CF stages tutorials-srv with NODE_ENV=production, which prunes devDependencies. The postinstall hook runs `patch-package` (added in #3107 to apply patches/cds-caching+2.1.0.patch, a runtime dependency), but patch-package itself was only in devDependencies — so the prod prune removed the binary and staging failed with: npm error command sh -c patch-package npm error sh: 1: patch-package: not found (code 127) **ERROR** Unable to build dependencies: exit status 127 BuildpackCompileFailed Moving patch-package to dependencies keeps the binary in the pruned prod tree so the postinstall completes and the cds-caching patch applies at staging time. cds-caching is itself a runtime dependency, so the patch must apply in the production install. Broke the 2026-11-11 DEV deploy (tutorials-srv staging, all 3 retries).
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
The 2026-11-11 DEV deploy failed:
tutorials-srvstaging broke in the buildpack compile phase (BuildpackCompileFailed, all 3 retries exhausted). Old DEV backend was untouched (failure occurred before swap); the stuck MTA process was aborted.Root cause
CF stages
tutorials-srvwithNODE_ENV=production, which prunesdevDependencies. PR #3107 added apostinstallhook runningpatch-package(to applypatches/cds-caching+2.1.0.patch), butpatch-packageitself was only in devDependencies. The prod prune removed the binary, so postinstall failed:Fix
Move
patch-packagefromdevDependencies→dependenciesso the binary survives the production prune and the postinstall completes at staging time.cds-caching(the patch target) is itself a runtime dependency, so the patch must apply in the production install.Verification
cds-caching@2.1.0confirmed independencies→ patch is runtime-relevant.patch-packagenow independencies,postinstallhook unchanged.🤖 Generated with Claude Code