Skip to content

Document the production build, and correct the /resources story - #17

Merged
oblomov-dev merged 2 commits into
mainfrom
claude/cap2ui5-modernisierung-23otcx
Aug 30, 2026
Merged

Document the production build, and correct the /resources story#17
oblomov-dev merged 2 commits into
mainfrom
claude/cap2ui5-modernisierung-23otcx

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Independent of the other three PRs in this set — safe to merge in any order.

Deployment

The page said npm run build and stopped there. What that actually has to run is npm ci + npm run build:productioncds build --production plus scripts/vendor-core.js — because the CDS build stages gen/srv with the app's "abap2UI5": "file:./core" dependency and does not stage the folder it names. Without the second half the archive builds, cf deploy succeeds, and the instance crash-loops on Cannot find module 'abap2UI5/engine'; that was the state of the shipped app until cap2UI5/builder-cap2UI5#26.

Readers vendoring a file: dependency in their own CAP project hit exactly the same thing, so the section also names the CAP-supported alternative (npm workspaces + cds build --ws-pack).

Also records that openui5-dist is not deployed — on BTP /resources comes from the ui5 destination — with the numbers behind that decision (611 MB, 43 advisories, 3 critical, none of it code the app loads), and adds abap2UI5-db-deployer to the mta.yaml module list, which the page had omitted.

Troubleshooting

The page claimed the server "fails at startup with an explicit message" when openui5-dist is missing. It does not: srv/cap/activate.js warns once and carries on, so the symptom is a blank page and a log line, not a failed boot. Corrected, with the actual message, plus a separate entry for the BTP case where a /resources 404 means the destination is wrong rather than a missing dependency — and the install to run now that the framework declares it as an optional peer dependency rather than a dependency.

Verification

verify-refs --require-checkout passes against a cap2UI5 checkout; site builds.


Generated by Claude Code

claude added 2 commits August 30, 2026 09:07
The deployment page said `npm run build` and stopped there. What that
actually has to run is `npm ci` + `npm run build:production` —
`cds build --production` plus `scripts/vendor-core.js` — because the CDS
build stages gen/srv with the app's `"abap2UI5": "file:./core"` dependency
and does not stage the folder it names. Without the second half the archive
builds, `cf deploy` succeeds, and the instance crash-loops on
`Cannot find module 'abap2UI5/engine'`; that was the state of the shipped
app until cap2UI5/builder-cap2UI5 fixed it. Readers vendoring a `file:`
dependency in their own CAP project hit the same thing, so the section also
names the CAP-supported alternative (npm workspaces + `cds build --ws-pack`).

Also records that openui5-dist is not deployed — on BTP `/resources` comes
from the `ui5` destination — and adds abap2UI5-db-deployer to the mta.yaml
module list, which the page had omitted.

Troubleshooting claimed the server "fails at startup with an explicit
message" when openui5-dist is missing. It does not: srv/cap/activate.js
warns once and carries on, so the symptom is a blank page and a log line,
not a failed boot. Corrected, with the actual message and a separate entry
for the BTP case, where a /resources 404 means the destination is wrong
rather than a missing dependency.

verify-refs --require-checkout passes against a cap2UI5 checkout; site
builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R2ofjmLGtR9pKxi3m2KvMq
Follows builder-abap2UI5-js@815593e. openui5-dist is no longer a dependency
of the framework package, so a project using the core installs it itself if
it wants the local /resources runtime — the docs said nothing about that and
would have left readers with a 404 they could not explain.

Deployment gains the numbers behind the decision (611 MB, 43 advisories, 3
critical, none of it code the app loads) and states that the staged module
leaves it out via `npm ci --omit=dev` rather than only via the vendor step's
prune. Troubleshooting names the install to run when a project never
declared it.

verify-refs --require-checkout passes against a cap2UI5 checkout; site builds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R2ofjmLGtR9pKxi3m2KvMq
Copilot AI lite review requested due to automatic review settings August 30, 2026 10:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@oblomov-dev
oblomov-dev merged commit 57caf95 into main Aug 30, 2026
1 check passed
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.

3 participants