windmill-labs/windmill · warning

Could not seed inline schemas at startup: ${err.message}

Error message

Could not seed inline schemas at startup: ${err.message}

What it means

During `wmill app dev` startup, the CLI infers schemas from inline TypeScript defaults in the working directory to seed the dev session. Failures (e.g. unreadable/malformed files) are non-fatal and logged as a yellow warning.

Source

Thrown at cli/src/commands/app/dev.ts:515

  }

  // Ensure node_modules exists
  const appDir = path.dirname(entryPoint) || process.cwd();
  await ensureNodeModules(appDir);

  // In-memory cache of inferred schemas (runnableId -> schema)
  // Used to generate wmill.d.ts without modifying raw_app.yaml
  // Seed with schemas inferred from every inline code file in the backend folder
  // so the initial wmill.d.ts already has typed args (without waiting for a file
  // change to trigger the watcher).
  const inferredSchemas: Record<string, any> = {};
  try {
    Object.assign(
      inferredSchemas,
      await inferAllInlineSchemas(process.cwd(), defaultTs),
    );
  } catch (err: any) {
    log.warn(
      colors.yellow(
        `Could not seed inline schemas at startup: ${err.message}`,
      ),
    );
  }

  // In-memory cache of schemas for path-based runnables fetched from the API.
  // Path-based runnables don't carry their schema in the local YAML (the script /
  // flow at the path is the source of truth), so we fetch once at dev start and
  // reuse for every wmill.d.ts regeneration.
  const pathRunnableSchemas: Record<string, any> = {};
  try {
    const initialRunnables = await loadRunnablesFromBackend(
      path.join(process.cwd(), APP_BACKEND_FOLDER),
      defaultTs,
    );
    Object.assign(
      pathRunnableSchemas,

View on GitHub (pinned to e474e8803c)

Solutions

  1. Check the warning context and fix the TS file that fails inline-schema inference
  2. Run the command from the directory containing raw_app.yaml
  3. Verify file read permissions in the project
  4. Proceed if schemas are optional — the warning is non-fatal; path-based fetch may still supply them

Example fix

// before
wmill app dev   # run from ~/
// after
cd my-app && wmill app dev
Defensive patterns

Strategy: fallback

Validate before calling

import { existsSync } from 'fs';
if (!existsSync('raw_app.yaml')) console.warn('Not in an app directory; inline schema seeding will fail');

Type guard

function hasMessage(e: unknown): e is { message: string } {
  return typeof e === 'object' && e !== null && 'message' in e;
}

Try / catch

try {
  Object.assign(inferredSchemas, await inferAllInlineSchemas(cwd, defaultTs));
} catch (err: any) {
  log.warn(colors.yellow(`Could not seed inline schemas at startup: ${err.message}`));
  // continue with path-based schema fetching
}

Prevention

When it happens

Trigger: inferAllInlineSchemas(cwd, defaultTs) throws: unreadable files, TypeScript that fails schema inference, or a missing/invalid defaultTs file.

Common situations: Running dev in a directory with broken/partial app sources; wrong cwd (no raw_app.yaml); permission issues; a TS file with syntax the inference can't handle.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/91eecde7da550478. Report an issue: GitHub.