{"record":{"id":"91eecde7da550478","repo":"windmill-labs/windmill","slug":"could-not-seed-inline-schemas-at-startup-err-me","errorCode":null,"errorMessage":"Could not seed inline schemas at startup: ${err.message}","messagePattern":"Could not seed inline schemas at startup: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/app/dev.ts","lineNumber":515,"sourceCode":"  }\n\n  // Ensure node_modules exists\n  const appDir = path.dirname(entryPoint) || process.cwd();\n  await ensureNodeModules(appDir);\n\n  // In-memory cache of inferred schemas (runnableId -> schema)\n  // Used to generate wmill.d.ts without modifying raw_app.yaml\n  // Seed with schemas inferred from every inline code file in the backend folder\n  // so the initial wmill.d.ts already has typed args (without waiting for a file\n  // change to trigger the watcher).\n  const inferredSchemas: Record<string, any> = {};\n  try {\n    Object.assign(\n      inferredSchemas,\n      await inferAllInlineSchemas(process.cwd(), defaultTs),\n    );\n  } catch (err: any) {\n    log.warn(\n      colors.yellow(\n        `Could not seed inline schemas at startup: ${err.message}`,\n      ),\n    );\n  }\n\n  // In-memory cache of schemas for path-based runnables fetched from the API.\n  // Path-based runnables don't carry their schema in the local YAML (the script /\n  // flow at the path is the source of truth), so we fetch once at dev start and\n  // reuse for every wmill.d.ts regeneration.\n  const pathRunnableSchemas: Record<string, any> = {};\n  try {\n    const initialRunnables = await loadRunnablesFromBackend(\n      path.join(process.cwd(), APP_BACKEND_FOLDER),\n      defaultTs,\n    );\n    Object.assign(\n      pathRunnableSchemas,","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/app/dev.ts#L497-L533","documentation":"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.","triggerScenarios":"inferAllInlineSchemas(cwd, defaultTs) throws: unreadable files, TypeScript that fails schema inference, or a missing/invalid defaultTs file.","commonSituations":"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.","solutions":["Check the warning context and fix the TS file that fails inline-schema inference","Run the command from the directory containing raw_app.yaml","Verify file read permissions in the project","Proceed if schemas are optional — the warning is non-fatal; path-based fetch may still supply them"],"exampleFix":"// before\nwmill app dev   # run from ~/\n// after\ncd my-app && wmill app dev","handlingStrategy":"fallback","validationCode":"import { existsSync } from 'fs';\nif (!existsSync('raw_app.yaml')) console.warn('Not in an app directory; inline schema seeding will fail');","typeGuard":"function hasMessage(e: unknown): e is { message: string } {\n  return typeof e === 'object' && e !== null && 'message' in e;\n}","tryCatchPattern":"try {\n  Object.assign(inferredSchemas, await inferAllInlineSchemas(cwd, defaultTs));\n} catch (err: any) {\n  log.warn(colors.yellow(`Could not seed inline schemas at startup: ${err.message}`));\n  // continue with path-based schema fetching\n}","preventionTips":["Run wmill app dev from the app root containing raw_app.yaml","Keep inline TS defaults syntactically valid (lint before dev)","Treat this warning as non-fatal; verify schemas populate after startup"],"tags":["cli","schema","startup","warning"],"backgroundTag":"schema-inference-failed","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}