The Build-and-test-development job in release.yaml fails on every push to main at Deploy mocked services:
[error] An error has occurred when compiling web app services. Error: webSourcePath: '.../client/dist' present in 'streamConfig' doesn't exist.
[error] Error building project: Web source folder not found: .../client/dist. Check streamConfig.webSourcePath - build the frontend first.
❌ Failure - Main Deploy mocked services
exitcode '2': failure
The server-ci mock target has streamWeb: true with webSourcePath: ../../client/dist, so sasjs cbd -t server-ci needs a production frontend build on disk. The Build-and-test-development job in build.yaml gained a "Build frontend for web streaming" step for exactly this reason; the equivalent job in release.yaml never did, so it deploys mocks against an empty client/dist.
Because release needs this job, the whole release pipeline is blocked: the released commit merges to main and no release is cut.
What changed
.gitea/workflows/release.yaml, job Build-and-test-development: added a Build frontend for web streaming step (cd client && npm run build) between Install dependencies and Setup and start SASjs server - the same step, in the same position, as the passing build.yaml job.
No product code, no test change. client/dist is gitignored, so nothing new is committed to the tree.
Verification
Reproduced the failure and the fix locally, against this branch's tree:
Without client/dist: npx @sasjs/cli cb -t server-ci in sas/mocks/sasjs - fails with Error building project: Web source folder not found: <repo>/client/dist. Check streamConfig.webSourcePath - build the frontend first. (identical to the CI error).
With a client/dist present: the same command completes - The project was successfully compiled for SASJS using target 'server-ci' and Services have been successfully built!, server-ci.json.zip written.
Supporting evidence from CI:
Run 2409 (this failure): job Build-production-and-ng-test success, job Build-and-test-development failure at Deploy mocked services.
Run 2400 (PR, build.yaml, i.e. the job that does build the frontend first): Build-and-test-development success, including the full Cypress suite against the mocked backend.
Not verified here: the full release workflow cannot run before merge - release.yaml triggers only on push to main, and a PR runs build.yaml instead. There is also no SHEET_PWD on this box, so npm ci in client/ (and therefore a real npm run build) could not be executed locally; step placement, YAML parse (yaml.safe_load, 12 steps in order) and prettier@3.8.4 --check all pass.
release was skipped in run 2409 and will run again on the next push to main once this is merged.
agent001
## Why
The `Build-and-test-development` job in `release.yaml` fails on every push to `main` at **Deploy mocked services**:
```
[error] An error has occurred when compiling web app services. Error: webSourcePath: '.../client/dist' present in 'streamConfig' doesn't exist.
[error] Error building project: Web source folder not found: .../client/dist. Check streamConfig.webSourcePath - build the frontend first.
❌ Failure - Main Deploy mocked services
exitcode '2': failure
```
The `server-ci` mock target has `streamWeb: true` with `webSourcePath: ../../client/dist`, so `sasjs cbd -t server-ci` needs a production frontend build on disk. The `Build-and-test-development` job in `build.yaml` gained a "Build frontend for web streaming" step for exactly this reason; the equivalent job in `release.yaml` never did, so it deploys mocks against an empty `client/dist`.
Because `release` needs this job, the whole release pipeline is blocked: the released commit merges to `main` and no release is cut.
## What changed
- `.gitea/workflows/release.yaml`, job `Build-and-test-development`: added a **Build frontend for web streaming** step (`cd client && npm run build`) between *Install dependencies* and *Setup and start SASjs server* - the same step, in the same position, as the passing `build.yaml` job.
No product code, no test change. `client/dist` is gitignored, so nothing new is committed to the tree.
## Verification
Reproduced the failure and the fix locally, against this branch's tree:
1. Without `client/dist`: `npx @sasjs/cli cb -t server-ci` in `sas/mocks/sasjs` - fails with `Error building project: Web source folder not found: <repo>/client/dist. Check streamConfig.webSourcePath - build the frontend first.` (identical to the CI error).
2. With a `client/dist` present: the same command completes - `The project was successfully compiled for SASJS using target 'server-ci'` and `Services have been successfully built!`, `server-ci.json.zip` written.
Supporting evidence from CI:
- Run 2409 (this failure): job `Build-production-and-ng-test` success, job `Build-and-test-development` failure at *Deploy mocked services*.
- Run 2400 (PR, `build.yaml`, i.e. the job that *does* build the frontend first): `Build-and-test-development` success, including the full Cypress suite against the mocked backend.
Not verified here: the full release workflow cannot run before merge - `release.yaml` triggers only on `push` to `main`, and a PR runs `build.yaml` instead. There is also no `SHEET_PWD` on this box, so `npm ci` in `client/` (and therefore a real `npm run build`) could not be executed locally; step placement, YAML parse (`yaml.safe_load`, 12 steps in order) and `prettier@3.8.4 --check` all pass.
`release` was skipped in run 2409 and will run again on the next push to `main` once this is merged.
- agent001
Reviewed the full base...head diff: one CI change in .gitea/workflows/release.yaml (+10 lines), adding a client production build before the mocked-services deploy. ci(release): is the right type and cuts no release, which matches the change.
.gitea/workflows/release.yaml:110-118 - the new step runs npm run build immediately after the install step (release.yaml:103-108) but skips npm run postinstall, which both other frontend build/serve paths in this workflow run first: the Angular Production Build job (release.yaml:61-65) and the cypress serve path (release.yaml:176). If postinstall produces anything the Angular build consumes, this step will fail or stream an incomplete dist. Add npm run postinstall before npm run build to match those paths.
.gitea/workflows/release.yaml:110-118 - the build happens before the index.html <sasjs> rewrites at release.yaml:178-180, so the dist streamed as the 'clickme' web app carries the repo's default serverUrl/appLoc rather than the local SASJS values. That is fine if the dist only needs to exist to satisfy webSourcePath (which is what the step comment describes), but the deployed copy cannot be opened against the test server - worth saying so in the step comment so the next reader does not assume it is a usable build.
No blocking issues.
Reviewed the full base...head diff: one CI change in .gitea/workflows/release.yaml (+10 lines), adding a client production build before the mocked-services deploy. `ci(release):` is the right type and cuts no release, which matches the change.
- .gitea/workflows/release.yaml:110-118 - the new step runs `npm run build` immediately after the install step (release.yaml:103-108) but skips `npm run postinstall`, which both other frontend build/serve paths in this workflow run first: the Angular Production Build job (release.yaml:61-65) and the cypress serve path (release.yaml:176). If postinstall produces anything the Angular build consumes, this step will fail or stream an incomplete dist. Add `npm run postinstall` before `npm run build` to match those paths.
- .gitea/workflows/release.yaml:110-118 - the build happens before the index.html `<sasjs>` rewrites at release.yaml:178-180, so the dist streamed as the 'clickme' web app carries the repo's default serverUrl/appLoc rather than the local SASJS values. That is fine if the dist only needs to exist to satisfy webSourcePath (which is what the step comment describes), but the deployed copy cannot be opened against the test server - worth saying so in the step comment so the next reader does not assume it is a usable build.
No blocking issues.
allan
merged commit 849153d4a2 into main2026-10-28 01:08:49 +00:00
allan
deleted branch fix/ci-release-build-frontend2026-10-28 01:08:49 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
The
Build-and-test-developmentjob inrelease.yamlfails on every push tomainat Deploy mocked services:The
server-cimock target hasstreamWeb: truewithwebSourcePath: ../../client/dist, sosasjs cbd -t server-cineeds a production frontend build on disk. TheBuild-and-test-developmentjob inbuild.yamlgained a "Build frontend for web streaming" step for exactly this reason; the equivalent job inrelease.yamlnever did, so it deploys mocks against an emptyclient/dist.Because
releaseneeds this job, the whole release pipeline is blocked: the released commit merges tomainand no release is cut.What changed
.gitea/workflows/release.yaml, jobBuild-and-test-development: added a Build frontend for web streaming step (cd client && npm run build) between Install dependencies and Setup and start SASjs server - the same step, in the same position, as the passingbuild.yamljob.No product code, no test change.
client/distis gitignored, so nothing new is committed to the tree.Verification
Reproduced the failure and the fix locally, against this branch's tree:
client/dist:npx @sasjs/cli cb -t server-ciinsas/mocks/sasjs- fails withError building project: Web source folder not found: <repo>/client/dist. Check streamConfig.webSourcePath - build the frontend first.(identical to the CI error).client/distpresent: the same command completes -The project was successfully compiled for SASJS using target 'server-ci'andServices have been successfully built!,server-ci.json.zipwritten.Supporting evidence from CI:
Build-production-and-ng-testsuccess, jobBuild-and-test-developmentfailure at Deploy mocked services.build.yaml, i.e. the job that does build the frontend first):Build-and-test-developmentsuccess, including the full Cypress suite against the mocked backend.Not verified here: the full release workflow cannot run before merge -
release.yamltriggers only onpushtomain, and a PR runsbuild.yamlinstead. There is also noSHEET_PWDon this box, sonpm ciinclient/(and therefore a realnpm run build) could not be executed locally; step placement, YAML parse (yaml.safe_load, 12 steps in order) andprettier@3.8.4 --checkall pass.releasewas skipped in run 2409 and will run again on the next push tomainonce this is merged.Reviewed the full base...head diff: one CI change in .gitea/workflows/release.yaml (+10 lines), adding a client production build before the mocked-services deploy.
ci(release):is the right type and cuts no release, which matches the change.npm run buildimmediately after the install step (release.yaml:103-108) but skipsnpm run postinstall, which both other frontend build/serve paths in this workflow run first: the Angular Production Build job (release.yaml:61-65) and the cypress serve path (release.yaml:176). If postinstall produces anything the Angular build consumes, this step will fail or stream an incomplete dist. Addnpm run postinstallbeforenpm run buildto match those paths.<sasjs>rewrites at release.yaml:178-180, so the dist streamed as the 'clickme' web app carries the repo's default serverUrl/appLoc rather than the local SASJS values. That is fine if the dist only needs to exist to satisfy webSourcePath (which is what the step comment describes), but the deployed copy cannot be opened against the test server - worth saying so in the step comment so the next reader does not assume it is a usable build.No blocking issues.