{"record":{"id":"130b1556252efae9","repo":"windmill-labs/windmill","slug":"no-metadata-generated-yet-for-filepath-run-wm","errorCode":null,"errorMessage":"No metadata generated yet for ${filePath}. Run 'wmill generate-metadata' to generate schema and lock.","messagePattern":"No metadata generated yet for (.+?)\\. Run 'wmill generate-metadata' to generate schema and lock\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/src/commands/script/script.ts","lineNumber":212,"sourceCode":"  }\n\n  if (isFileResource(filePath) || isFilesetResource(filePath)) {\n    throw Error(\n      \"Cannot push a file/fileset resource content file as a script, push its .resource.yaml with 'wmill resource push' instead\"\n    );\n  }\n\n  await requireLogin(opts);\n\n  // Warn about metadata state before pushing\n  try {\n    const content = await readScriptContent(filePath);\n    const remotePath = removeExtensionToPath(filePath).replaceAll(SEP, \"/\");\n    const contentHash = await computePushMetadataHash(filePath, content);\n    const conf = await readLockfile();\n    const hasLockEntry = conf.locks && (conf.locks[remotePath] !== undefined || conf.locks[`${remotePath}.ts`] !== undefined);\n    if (!hasLockEntry) {\n      log.warn(colors.yellow(\n        `No metadata generated yet for ${filePath}. Run 'wmill generate-metadata' to generate schema and lock.`\n      ));\n    } else if (!(await checkifMetadataUptodate(remotePath, contentHash, conf))) {\n      log.warn(colors.yellow(\n        `Metadata for ${filePath} appears stale (content changed since last 'wmill generate-metadata').\\n` +\n        `The schema and lock may not match the current code. Consider running 'wmill generate-metadata' first.`\n      ));\n    }\n  } catch {\n    // Don't block push if check fails\n  }\n\n  const codebases = await listSyncCodebases(opts as SyncOptions);\n\n  await handleFile(\n    filePath,\n    workspace,\n    [],","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/cli/src/commands/script/script.ts#L194-L230","documentation":"Before pushing a script, `wmill push` checks the lockfile for a lock entry at the script's remote path. If none exists, it means `wmill generate-metadata` has never been run for that file, so the schema (required args) and lock are missing; wmill warns (without blocking) that the deploy will lack generated metadata.","triggerScenarios":"Running `wmill push <script file>` on a newly created script whose lockfile entry was never generated; a script moved/renamed so its remotePath no longer matches any entry in .metadata/lockfile; a fresh clone where the metadata was never committed or generated.","commonSituations":"Onboarding a new script into a repo without running generate-metadata; renaming scripts; CI pipelines that push without a generate-metadata step.","solutions":["Run `wmill generate-metadata` for the script (or its folder), then push again","Verify the script's remote path matches the paths in .metadata/lockfile.json — rename back or regenerate metadata after moving the script","Add a `wmill generate-metadata` step to CI before `wmill push`"],"exampleFix":"// before\nwmill push f/scripts/foo.ts   # warns: no lock entry\n// after\nwmill generate-metadata\nwmill push f/scripts/foo.ts","handlingStrategy":"validation","validationCode":"const lock = JSON.parse(fs.readFileSync('.metadata/lockfile.json','utf8')); if (!lock.locks?.[remotePath]) throw new Error('run wmill generate-metadata');","typeGuard":null,"tryCatchPattern":null,"preventionTips":["generate-metadata after creating scripts","commit .metadata","regenerate after moves"],"tags":["cli","metadata","lockfile"],"backgroundTag":"missing-generated-metadata","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"}