Skip to content

Commit 41090fd

Browse files
voidstackloopclaude
andcommitted
fix(ci): sbom job never installed @modelforge/contracts's own dependencies
Root-caused from the real CI log (npm ls --all failing with ELSPROBLEMS: missing typescript/zod required by contracts@npm:@modelforge/contracts, plus a handful of extraneous @emnapi/@napi-rs/@tybys packages as a downstream symptom) and reproduced exactly, byte for byte, locally: frontend/ and app/ both depend on packages/contracts via file:../packages/contracts, which npm ci only symlinks into their own node_modules -- it never installs *that* package's own dependencies, since this repo uses plain file: references rather than true npm workspaces. cyclonedx-npm shells out to npm ls --all, which walks into the symlink and reports it broken whenever packages/contracts/node_modules is empty -- exactly what the sbom job's steps left it as, unlike test/server/e2e which already gained an equivalent install step in an earlier fix. Added the same 'install @modelforge/contracts's own deps' step here. Verified locally: removed packages/contracts/node_modules entirely, reproduced the identical ELSPROBLEMS output CI showed, then confirmed both frontend's and app's SBOM generation succeed cleanly (exit 0, zero warnings) once that install step runs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 2288c34 commit 41090fd

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,26 @@ jobs:
430430
node-version: 22
431431
cache: npm
432432
cache-dependency-path: |
433+
packages/contracts/package-lock.json
433434
frontend/package-lock.json
434435
app/package-lock.json
435436
mastervault-mcp-server/package-lock.json
436437
438+
# frontend/ and app/ both depend on this via `file:../packages/contracts`.
439+
# `npm ci` in either only symlinks packages/contracts itself into their
440+
# node_modules — it never installs *that* package's own dependencies
441+
# (zod, typescript) into packages/contracts/node_modules, since this
442+
# repo uses plain `file:` references, not true npm workspaces. cyclonedx-
443+
# npm shells out to `npm ls --all`, which walks into that symlink and
444+
# reports it as broken ("missing: typescript, zod, required by
445+
# contracts@npm:@modelforge/contracts") whenever this step is skipped —
446+
# confirmed by reproducing the exact ELSPROBLEMS/exit-254 failure this
447+
# job hit in CI, byte for byte, with packages/contracts/node_modules
448+
# absent, and confirming it clears once this step runs.
449+
- name: Install @modelforge/contracts dependencies
450+
working-directory: packages/contracts
451+
run: npm ci
452+
437453
- name: Install frontend dependencies
438454
working-directory: frontend
439455
run: npm ci

0 commit comments

Comments
 (0)