Development guide misses two setup steps #135

Closed
opened 2026-10-09 19:56:01 -04:00 by goddard · 1 comment
Collaborator

Two steps that a fresh setup needs aren't in the development guide.

  • In a fresh checkout, npm run seed:fixture fails with failed to resolve "extends":"./.svelte-kit/tsconfig.json" until svelte-kit sync has run. The Synthetic UI preview section (docs/development/README.md:29-34) doesn't mention it.
  • The report and launch workers load from .svelte-kit/ unless NODE_ENV=production (reports/index.ts:52-54, launch-preparation.ts:62). Running a production build with node build and no NODE_ENV looks for workers that npm run build doesn't create there. Nothing in the docs mentions node build or NODE_ENV.

Fix

  • Add npx svelte-kit sync before seed:fixture in the preview steps
  • Note that node build needs NODE_ENV=production, or resolve the worker paths from the build output
Two steps that a fresh setup needs aren't in the development guide. - In a fresh checkout, `npm run seed:fixture` fails with `failed to resolve "extends":"./.svelte-kit/tsconfig.json"` until `svelte-kit sync` has run. The Synthetic UI preview section (`docs/development/README.md:29-34`) doesn't mention it. - The report and launch workers load from `.svelte-kit/` unless `NODE_ENV=production` (`reports/index.ts:52-54`, `launch-preparation.ts:62`). Running a production build with `node build` and no `NODE_ENV` looks for workers that `npm run build` doesn't create there. Nothing in the docs mentions `node build` or `NODE_ENV`. **Fix** - [x] Add `npx svelte-kit sync` before `seed:fixture` in the preview steps - [x] Note that `node build` needs `NODE_ENV=production`, or resolve the worker paths from the build output
goddard added the
priority
low
type/maintainability
labels 2026-10-09 19:56:01 -04:00
josh was assigned by goddard 2026-10-09 19:56:01 -04:00
Author
Collaborator

Reviewed b09aff80b2. Both setup steps are documented and work as written, so I'm closing this.

Checklist

  • Add svelte-kit sync before seed:fixture. docs/development/README.md:33 runs npx svelte-kit sync before the seeder, with a line explaining why. In a fresh worktree with no .svelte-kit, the seeder failed with the extends error without that step and created the fixture after it.
  • Note that node build needs NODE_ENV=production. docs/development/README.md:127-137 gives npm run build, then NODE_ENV=production node build, and explains where the workers load from. In the same worktree, npm run build wrote build/reports/worker.mjs and build/launch/worker.mjs. With NODE_ENV=production, GET /api/metrics returned 200. Without it, it returned 500 and the log showed Cannot find module '.../.svelte-kit/reports/worker.mjs'.

Review notes

  • The note that the Docker image already sets the variable is right (Dockerfile:32).
  • CI run 844 on the current HEAD is green.
Reviewed b09aff80b23f61f59efaaf1f04571a4b423cb69f. Both setup steps are documented and work as written, so I'm closing this. **Checklist** - [x] **Add `svelte-kit sync` before `seed:fixture`.** `docs/development/README.md:33` runs `npx svelte-kit sync` before the seeder, with a line explaining why. In a fresh worktree with no `.svelte-kit`, the seeder failed with the `extends` error without that step and created the fixture after it. - [x] **Note that `node build` needs `NODE_ENV=production`.** `docs/development/README.md:127-137` gives `npm run build`, then `NODE_ENV=production node build`, and explains where the workers load from. In the same worktree, `npm run build` wrote `build/reports/worker.mjs` and `build/launch/worker.mjs`. With `NODE_ENV=production`, `GET /api/metrics` returned 200. Without it, it returned 500 and the log showed `Cannot find module '.../.svelte-kit/reports/worker.mjs'`. **Review notes** - The note that the Docker image already sets the variable is right (`Dockerfile:32`). - CI [run 844](https://gitea.thewrightserver.net/josh/electric-cherry/actions/runs/844) on the current HEAD is green.
Sign in to join this conversation.