Repository navigation
Description
The documentation platform in docs-platform/ cannot be built. npm run build:docs (vitepress build) fails on unmodified main, and it fails for at least four independent reasons stacked behind each other — each one only becomes visible after the one in front of it is fixed. Nothing in CI or the Makefile runs it, which is why none of this has ever been reported.
This is the same class of defect as #314 (the JavaScript SDK's 48 tsc errors): a build target that nothing executes, so it is free to rot indefinitely while looking fine.
How it was found
While closing the three vite Dependabot alerts, I tried to confirm the bump didn't regress the docs build — and discovered there was no working build to regress. Reproduced in a scratch copy of docs-platform/ with unmodified package.json:
$ npx vitepress build
✘ [ERROR] "vitepress" resolved to an ESM file. ESM file cannot be loaded by `require`.
[plugin externalize-deps]
The four faults, in the order they surface
1. No "type": "module" in docs-platform/package.json. vitepress is ESM-only, and vite 5 loads the config through require. This is the error above.
2. .vitepress/config.js is CommonJS. Adding "type": "module" to fix (1) makes Node treat every .js file in the directory as ESM, and the config uses require(). So the two faults are mutually exclusive under one fix: "type": "module" needs the config converted to import/export, or the config renamed to .mjs/.mts.
3. markdown-it-container cannot be required from the bundled config. With "type": "module" in place, the next failure is Dynamic require of ".../markdown-it-container/index.js" is not supported — esbuild bundles the config and the CJS dependency's require does not survive it.
4. Three of the five theme components do not exist. .vitepress/theme/index.js imports:
import ApiPlayground from '../components/ApiPlayground.vue'
import CodeRunner from '../components/CodeRunner.vue'
import InteractiveExample from '../components/InteractiveExample.vue'
import PerformanceChart from '../components/PerformanceChart.vue'
import ConfigurationBuilder from '../components/ConfigurationBuilder.vue'.vitepress/components/ contains only ApiPlayground.vue and CodeRunner.vue. InteractiveExample.vue, PerformanceChart.vue and ConfigurationBuilder.vue do not exist anywhere in the repository — not under another name, not in another directory. This one cannot be fixed by configuration; the components have to be written or the imports removed.
Behind those four there is at least one more layer: with vite overridden to 6.x (which resolves fault 1 on its own, since vite 6 loads ESM configs), the build advances all the way to page compilation and then fails on README.md:166 with SyntaxError: [plugin vite:vue] Invalid end tag. docs-platform/README.md is a developer README that is being fed to the site compiler as a content page, because there is no srcExclude in the config. So the page set itself is wrong, independently of the module system.
Also broken in the same directory
npm run buildisbuild:docs && build:client, andbuild:clientisvite build client. There is noclient/directory. So even a fixedbuild:docsleavesnpm run buildfailing on the next line. Either the directory was never committed or the script is vestigial.package.jsondeclares"main": "src/server.js"and atestscript ofjestwith no test files.
Why it matters
Two reasons beyond the obvious:
- The
vitesecurity work cannot be verified end to end. Theoverridesblock added for alerts 1–3 is verified bynpm auditand by module loading, because there is no successful build to compare against. A build that ran in CI would have made that a stronger claim. - The docs platform is a source of documentation overclaims (see the Part 4 audit notes):
docs-platform/index.md:278-293renders a performance chart from hardcoded arrays, and:45claims GDPR/HIPAA/SOC2 compliance. A build nobody runs is also a page nobody reads critically.
Fix order
- Add
vitepress build(or the wholenpm run build) to a CI job so the failure is visible and cannot regress silently. Expect it red. - Decide whether the platform is maintained at all. It is plausible that the right resolution is to delete
docs-platform/in favour of the MkDocs site, in which case steps 3–6 are moot and the threevite/uuidoverrides go with it. That decision should be made before anyone writes three Vue components. - If kept: rename
.vitepress/config.js→config.mtsand add"type": "module", resolving faults 1–3 together. - Add
srcExclude: ['README.md'](and audit what else in the tree is being treated as a page). - Write or delete
InteractiveExample.vue,PerformanceChart.vue,ConfigurationBuilder.vue. IfPerformanceChartis the component behind the hardcoded-array chart, deleting it is the better fix, and it overlaps with the fabricated-performance-data cleanup. - Fix or remove
build:clientand the missingclient/directory.
Activity
fix(security): force vite 6 and uuid 11 through overrides, not a vers…
scttfrdmn commentedon Aug 4, 2026
All four faults are resolved, and the gate this issue asks for exists. Verified on
mainat ee952e7 rather than inferred from the PRs:Worth recording that the four faults as filed are not the three that #334 fixed, because the diagnosis changed once the build got far enough to produce a different error:
"type": "module"vitemoved to 6.4.3, which loads an ESM-onlyvitepressfrom a CJS-context config without it. The fault was version-specific to vite 5, not structural.vitepress/config.jsis CommonJSrequire()calls today anywaymarkdown-it-containercannot be required from the bundled config:::syntax, and themdhanded to that hook is VitePress's own bundled instance, not the top-level package. Removed the hook and all three packages rather than making the require survive bundling. The only surviving mention is the comment explaining why they are gonegit log --allfound no history for any of them — never written, not deleted. Two pages mounted them anyway and now say what they would have shownTwo faults #317 did not know about, both found only once the import error stopped masking them, and both in #334: a
```pythonfence nested inside a```markdownfence of equal length, so the inner fence closed the outer block and</CodeRunner>reached the Vue compiler as a stray tag; and a license link leaving the site root, which fails the build as a dead link.The gate is
docs-siteinci.yml, runningnpx vitepress build .. As of #337 it installs withnpm ciagainst a committed lockfile, so it tests a tree a reader can reproduce — which the originalnpm installdid not.This issue's framing is the one that generalised: "a build target that nothing executes is free to rot indefinitely while looking fine." That is now three for three in this release — the JS SDK's 48
tscerrors (#314), the Java SDK's four compile errors, and this. Remaining instance: nothing runsdocker buildondocs-platform/Dockerfile, whose four missingCOPYsources are #336.