Skip to content

docs-platform: package.json, Dockerfile and docker-compose all name files that do not exist #336

Closed

Description

@scttfrdmn

Found while fixing the docs site build (#214, #334) and removing three unused dependencies (#299). None of these breaks the site build, which is why they survived — but each is a documented entry point that fails when used.

docs-platform/src/ contains exactly one file: api-server.js. package.json names a different one in four places:

key value reality
main src/server.js does not exist
scripts.start node src/server.js fails immediately
scripts.dev nodemon src/server.js fails immediately
scripts.lint / scripts.format eslint src/ client/ / prettier --write src/ client/ client/ does not exist

scripts.build also runs vite build client, against that same absent directory — so npm run build in this directory cannot succeed even now that build:docs works. The site is built by npx vitepress build ., which is what the new docs-site CI job runs and what #334 verified.

So npm start — the obvious thing to type — has never worked here, and there is no history of a src/server.js or a client/ in this repository.

What to decide

Whether the API server is part of this project's supported surface. It is real code (api-server.js serves a health endpoint on API_PORT, defaulting 3001, and I verified it responds), but nothing builds it, tests it, deploys it, or documents how to run it correctly.

Related, small

api-server.js:27 calls require('dotenv').config(). Once dotenv 17 lands (#300) that prints a banner to stdout on every start:

◇ injected env (0) from .env  ·  tip: ⌘ override existing { override: true }

Cosmetic, and suppressible with config({ quiet: true }). Worth doing in the same change rather than as its own PR.

Activity

  1. added
    type: technical-debt
    priority: low
    area: docs
    on Aug 4, 2026
  2. scttfrdmn commented on Aug 4, 2026

    @scttfrdmn
    OwnerAuthor

    Widening this: the same defect class runs through Dockerfile and docker-compose.yml, and it is worse there than in the scripts, because those two files are what README.md:36-50 presents as the production path.

    Dockerfile — four of eight COPY sources do not exist

    COPY api/ api/          → ABSENT
    COPY tutorials/ tutorials/ → ABSENT
    COPY sdks/ sdks/        → ABSENT
    COPY public/ public/    → ABSENT
    

    git log --all -- docs-platform/<dir> returns zero commits for all four — same signature as the three Vue components in #334: never written, not deleted. A COPY whose source is missing is a hard build failure, so docker build in this directory has never succeeded either. Present and fine: .vitepress/, guide/, playground/, index.md, src/.

    There is also no .dockerignore, and line 12 runs npm ci --only=production — which cannot work here at all, verified against a scratch copy of this manifest:

    npm error The `npm ci` command can only install with an existing package-lock.json
    

    That is the same missing lockfile as [#214], reached by a second route. So even with the four directories restored, the build fails at step two.

    docker-compose.yml — three more absent mounts

    ./nginx.conf:/etc/nginx/nginx.conf:ro     → ABSENT
    ./prometheus.yml:/etc/prometheus/...:ro   → ABSENT
    ./grafana/dashboards, ./grafana/provisioning → ABSENT
    

    All three are behind profiles: (production, monitoring), so docker compose up without a profile does not touch them — which is why they went unnoticed. Selecting the profile the README documents does.

    Worth noting what this reframes. CMD ["node", "src/api-server.js"] at line 69 means the Dockerfile is the one place in the repository that names the API server correctly — main, start and dev in package.json all name the absent src/server.js. So the deployment artifact and the manifest disagree about the entry point, and the manifest is the wrong one. That strengthens the "yes, it is supported surface" side of the decision this issue asks for: api-server.js is what every non-package.json reference points at.

    I could not exercise docker build to confirm the failure order — no Docker daemon running on this host — so the four missing COPY sources and the npm ci failure are each verified directly (filesystem, git history, scratch npm ci) rather than by watching one build fail. Flagging that rather than implying I ran it.

    Revised scope

    Whichever way the supported-surface question goes, three things follow rather than one:

    1. package.json — the four keys in the table above.
    2. Dockerfile — drop the four absent COPY lines; npm ci needs [docs-platform: no committed lockfile, so Dependabot cannot apply npm security updates #214]'s lockfile, or npm install --omit=dev.
    3. docker-compose.yml — supply the three config files or drop the profiles that mount them.

    And the lesson is [#214]'s again, one layer out: docs-site now gates vitepress build, so the site cannot silently break again. Nothing gates docker build, so this cannot be called fixed without a job that runs it.

  3. added
    area: build
    on Aug 4, 2026
  4. changed the title [-]docs-platform: package.json scripts and `main` point at files that do not exist[/-] [+]docs-platform: package.json, Dockerfile and docker-compose all name files that do not exist[/+] on Aug 4, 2026
  5. scttfrdmn commented on Aug 4, 2026

    @scttfrdmn
    OwnerAuthor

    Measured the whole surface while triaging #339/#340/#341, and it is wider than the four keys this issue records. Two things worth adding: 6 of 11 npm scripts cannot run, and two devDependencies are dependencies of nothing, which changes what to do about the Dependabot PRs against this directory.

    Every script, run rather than read

    start          node src/server.js          → src/server.js does not exist
    dev            nodemon src/server.js       → same
    build          build:docs && build:client  → FAILS at build:client
    build:docs     vitepress build             → works (this is what CI gates)
    build:client   vite build client           → "Could not resolve entry module client/index.html"
    preview        vitepress preview           → works
    serve:docs     vitepress dev               → works
    serve:api      node src/api-server.js      → works; the only correct entry point in the manifest
    test           jest                        → "No tests found", exit 1
    lint           eslint src/ client/         → no config file at all, plus client/ missing
    format         prettier --write src/ client/ → client/ missing
    

    npm run build — the script a reader would try first, and the one whose name matches the CI job's purpose — fails. CI passes because docs-site runs npx vitepress build . directly, not npm run build. So the working build path and the documented one are different paths, and only the undocumented one is gated.

    Same "never written" signature as #334

    git log --all for every missing path:

    docs-platform/src/server.js   0 commits
    docs-platform/client          0 commits
    docs-platform/api             0 commits
    docs-platform/tutorials       0 commits
    docs-platform/sdks            0 commits
    docs-platform/public          0 commits
    

    Zero, not "deleted at some point" — exactly what #334 found for ApiPlayground's three sibling components. The last four are the Dockerfile COPY sources already noted on this issue; the first two are new here.

    Two devDependencies with no consumer

    • typescript ^5.3.3 — there are 0 tracked .ts or .tsx files in this directory and no tsconfig.json anywhere in it. Nothing compiles TypeScript here.
    • jest ^29.7.0 — 0 test files. npm test reports testMatch ... 0 matches and exits 1. There is no jest key in package.json and no jest.config.*.
    • eslint ^8.56.0 — installed, but there is no .eslintrc*, no eslint.config.js, and no eslintConfig block, so npm run lint errors out asking you to run npm init @eslint/config. The dependency is real; its configuration is missing. (Note this is the same defect deps(deps-dev): bump the typescript-eslint group across 1 directory with 3 updates #309/deps(js): take eslint 10 by moving the config where eslint 10 reads it #335 fixed for sdks/javascript — a linter that cannot find its config — and this directory was not part of that fix.)

    That last distinction matters for the fix: eslint needs a config, whereas typescript and jest need removing, because there is nothing for them to act on.

    What this changes about the open PRs

    #341 bumps typescript 5.9.3 → 7.0.2 and #340 bumps jest 29.7.0 → 30.4.2, both against packages nothing here uses. Both show 31 green checks, and that green means only that the Go test suite and vitepress build still work — neither PR's subject is exercised by any job, because neither package is reachable from any script that runs. Taking a major bump on an unused package is churn; the honest resolution is to delete the packages, which supersedes both PRs the way #299 superseded the markdown-it-* bumps.

    #339 (dockerode 4.0.12 → 5.0.1) is different and should be taken on its merits: src/api-server.js:22 genuinely requires it and :399 calls createContainer. Checked in a scratch install — v5 constructs and still exposes createContainer, listContainers, getContainer, ping; its only engines change is node >= 8 → node >= 14.17, which every supported Node satisfies. What I could not check is runtime behaviour against a live daemon: no Docker daemon on this host, and the code path needs one. Flagging that rather than implying the bump is fully verified.

    Revised scope

    1. package.json: fix start/dev (point at api-server.js, the only entry point that exists, or write server.js); drop build:client and the client/ half of lint/format, or write client/; remove typescript and jest, or give them something to act on; add an eslint config.
    2. Dockerfile: four COPY sources that never existed, plus npm ci --only=production at :12 — which works now that fix(docs-platform): commit the lockfile, so the tree is reproducible and auditable #337 committed the lockfile, and did not before. Nothing runs docker build in CI, which is why none of this was caught.
    3. docker-compose.yml: nginx.conf, prometheus.yml, grafana/ all absent, behind profiles:.

    The decision this issue still needs is unchanged and is upstream of all three: is docs-platform's API server supported surface, or is this directory only the VitePress site? If only the site, most of the above is deletion rather than repair, and that is a much smaller change than the list suggests.

  6. added 3 commits that reference this issue on Aug 5, 2026
    70398ce
    1478d76
    b543d28
  7. added 3 commits that reference this issue on Aug 5, 2026
    974a5b0
    aae5c40
    e9b897b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: buildarea: docspriority: lowtype: technical-debt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions