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
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).
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.
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.
Two steps that a fresh setup needs aren't in the development guide.
npm run seed:fixturefails withfailed to resolve "extends":"./.svelte-kit/tsconfig.json"untilsvelte-kit synchas run. The Synthetic UI preview section (docs/development/README.md:29-34) doesn't mention it..svelte-kit/unlessNODE_ENV=production(reports/index.ts:52-54,launch-preparation.ts:62). Running a production build withnode buildand noNODE_ENVlooks for workers thatnpm run builddoesn't create there. Nothing in the docs mentionsnode buildorNODE_ENV.Fix
npx svelte-kit syncbeforeseed:fixturein the preview stepsnode buildneedsNODE_ENV=production, or resolve the worker paths from the build outputReviewed
b09aff80b2. Both setup steps are documented and work as written, so I'm closing this.Checklist
svelte-kit syncbeforeseed:fixture.docs/development/README.md:33runsnpx svelte-kit syncbefore the seeder, with a line explaining why. In a fresh worktree with no.svelte-kit, the seeder failed with theextendserror without that step and created the fixture after it.node buildneedsNODE_ENV=production.docs/development/README.md:127-137givesnpm run build, thenNODE_ENV=production node build, and explains where the workers load from. In the same worktree,npm run buildwrotebuild/reports/worker.mjsandbuild/launch/worker.mjs. WithNODE_ENV=production,GET /api/metricsreturned 200. Without it, it returned 500 and the log showedCannot find module '.../.svelte-kit/reports/worker.mjs'.Review notes
Dockerfile:32).