{"record":{"id":"dc5e4e4a98e44d8f","repo":"windmill-labs/windmill","slug":"could-not-fetch-schemas-for-path-based-runnables","errorCode":null,"errorMessage":"Could not fetch schemas for path-based runnables: ${err.message}","messagePattern":"Could not fetch schemas for path-based runnables: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/app/dev.ts","lineNumber":537,"sourceCode":"    );\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,\n      await fetchPathRunnableSchemas(workspaceId, initialRunnables),\n    );\n  } catch (err: any) {\n    log.warn(\n      colors.yellow(\n        `Could not fetch schemas for path-based runnables: ${err.message}`,\n      ),\n    );\n  }\n\n  await genRunnablesTs(inferredSchemas, pathRunnableSchemas);\n\n  // Ensure dist directory exists\n  const distDir = path.join(process.cwd(), \"dist\");\n  if (!fs.existsSync(distDir)) {\n    fs.mkdirSync(distDir);\n  }\n\n  // Session recording: the app moves into an iframe of a shell page holding the\n  // recorder toolbar, and finished recordings land in the app folder.\n  const recordingEnabled = opts.recording ?? false;\n  const recordingsDir = path.join(process.cwd(), RECORDINGS_FOLDER);","sourceCodeStart":519,"sourceCodeEnd":555,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/app/dev.ts#L519-L555","documentation":"Startup-time failure in `wmill app dev`: the initial loadRunnablesFromBackend succeeded but fetchPathRunnableSchemas (which pulls script/flow schemas from the remote workspace for path-based runnables that carry no schema in local YAML) threw. The dev server keeps running; wmill.d.ts regeneration just lacks those schemas.","triggerScenarios":"fetchPathRunnableSchemas(workspaceId, initialRunnables) throws: network failure, invalid/expired workspace credentials, wrong workspaceId, or the referenced paths not existing server-side.","commonSituations":"CLI not logged in or token expired; pointing at the wrong workspace; offline/VPN issues; app references a script/flow path that was deleted or renamed.","solutions":["Re-authenticate: wmill workspace add / wmill switch and verify the token","Check the app's runnable paths exist in the target workspace","Verify network connectivity to the Windmill instance","Retry — the warning is non-fatal and schemas can refresh on next run"],"exampleFix":"// before\nwmill app dev   # with stale token\n// after\nwmill workspace add local http://localhost:8000 admin@windmill.dev changeme && wmill app dev","handlingStrategy":"retry","validationCode":"const ws = await wmill.getCurrentWorkspace();\nif (!ws) throw new Error('No active workspace; run wmill workspace add first');","typeGuard":"function isHttpError(e: unknown): e is { status?: number; message: string } {\n  return typeof e === 'object' && e !== null && 'message' in e;\n}","tryCatchPattern":"try {\n  Object.assign(pathRunnableSchemas, await fetchPathRunnableSchemas(workspaceId, initialRunnables));\n} catch (err: any) {\n  log.warn(colors.yellow(`Could not fetch schemas: ${err.message}`));\n  // app still serves; schemas degrade to {}\n}","preventionTips":["Re-authenticate before long dev sessions (tokens expire)","Verify the workspace and instance URL with wmill workspace current","Check network/VPN to the Windmill instance","Ensure referenced runnable paths exist in the workspace"],"tags":["cli","schema","network","workspace"],"backgroundTag":"schema-fetch-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"}