Appearance
date: 2026-06-16 tags: [wayfinder, vue, types-check, ci, generated-artifacts] status: active graduated_to:
wayfinder:generate needs --with-form — a missing form variant looks like a code regression
Symptom — npm run types:check (vue-tsc) fails across many auth/settings components with Property 'form' does not exist on type '{ (options?…): RouteDefinition<"post">; … }' — even on files the current branch never touched.
Root cause — not a code regression: the generated Wayfinder route helpers were missing their .form variant. The project enables form variants in the Vite plugin (vite.config.ts → wayfinder({ formVariants: true })), so the build emits route.form-aware helpers. But a fresh container (or a plain php artisan wayfinder:generate) regenerates without form variants, so vue-tsc sees route helpers that have no .form and every xxx.form access errors. The generated files under resources/js/routes + resources/js/actions are gitignored, so a cold container starts from whatever the artisan default emits.
Fix — regenerate with the flag: php artisan wayfinder:generate --with-form. (The Vite plugin already does this during npm run build/dev; the standalone artisan command does not unless you pass --with-form.)
Guard — when types:check fails on .form (or any route-helper shape) in files you didn't touch, suspect stale generated Wayfinder types before suspecting the code. Regenerate with --with-form first. The flag must mirror vite.config.ts's formVariants setting — if that config changes, the manual regen command changes with it.