Skip to content

fix(deploy): move patch-package to dependencies (unbreaks tutorials-srv staging) - #3108

Merged
jung-thomas merged 1 commit into
DEVfrom
fix/patch-package-prod-dep
Nov 11, 2026
Merged

jung-thomas merged 1 commit into
DEVfrom
fix/patch-package-prod-dep

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Problem

The 2026-11-11 DEV deploy failed: tutorials-srv staging 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-srv with NODE_ENV=production, which prunes devDependencies. PR #3107 added a postinstall hook running patch-package (to apply patches/cds-caching+2.1.0.patch), but patch-package itself was only in devDependencies. The prod prune removed the binary, so postinstall failed:

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

Fix

Move patch-package from devDependencies → dependencies so 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.0 confirmed in dependencies → patch is runtime-relevant.
  • patch-package now in dependencies, postinstall hook unchanged.
  • Diff is minimal: one line moved (−devDeps/+deps), no other package.json churn.
  • Full confirmation = a green re-deploy to DEV after merge.

🤖 Generated with Claude Code

…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).
@jung-thomas jung-thomas reopened this Nov 11, 2026
@jung-thomas
jung-thomas merged commit cf81e85 into DEV Nov 11, 2026
@jung-thomas
jung-thomas deleted the fix/patch-package-prod-dep branch November 11, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant