windmill-labs/windmill · warning

No metadata generated yet for ${filePath}. Run 'wmill genera

Error message

No metadata generated yet for ${filePath}. Run 'wmill generate-metadata' to generate schema and lock.

What it means

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.

Source

Thrown at cli/src/commands/script/script.ts:212

  }

  if (isFileResource(filePath) || isFilesetResource(filePath)) {
    throw Error(
      "Cannot push a file/fileset resource content file as a script, push its .resource.yaml with 'wmill resource push' instead"
    );
  }

  await requireLogin(opts);

  // Warn about metadata state before pushing
  try {
    const content = await readScriptContent(filePath);
    const remotePath = removeExtensionToPath(filePath).replaceAll(SEP, "/");
    const contentHash = await computePushMetadataHash(filePath, content);
    const conf = await readLockfile();
    const hasLockEntry = conf.locks && (conf.locks[remotePath] !== undefined || conf.locks[`${remotePath}.ts`] !== undefined);
    if (!hasLockEntry) {
      log.warn(colors.yellow(
        `No metadata generated yet for ${filePath}. Run 'wmill generate-metadata' to generate schema and lock.`
      ));
    } else if (!(await checkifMetadataUptodate(remotePath, contentHash, conf))) {
      log.warn(colors.yellow(
        `Metadata for ${filePath} appears stale (content changed since last 'wmill generate-metadata').\n` +
        `The schema and lock may not match the current code. Consider running 'wmill generate-metadata' first.`
      ));
    }
  } catch {
    // Don't block push if check fails
  }

  const codebases = await listSyncCodebases(opts as SyncOptions);

  await handleFile(
    filePath,
    workspace,
    [],

View on GitHub (pinned to e474e8803c)

Solutions

  1. Run `wmill generate-metadata` for the script (or its folder), then push again
  2. Verify the script's remote path matches the paths in .metadata/lockfile.json — rename back or regenerate metadata after moving the script
  3. Add a `wmill generate-metadata` step to CI before `wmill push`

Example fix

// before
wmill push f/scripts/foo.ts   # warns: no lock entry
// after
wmill generate-metadata
wmill push f/scripts/foo.ts
Defensive patterns

Strategy: validation

Validate before calling

const lock = JSON.parse(fs.readFileSync('.metadata/lockfile.json','utf8')); if (!lock.locks?.[remotePath]) throw new Error('run wmill generate-metadata');

Prevention

When it happens

Trigger: 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.

Common situations: Onboarding a new script into a repo without running generate-metadata; renaming scripts; CI pipelines that push without a generate-metadata step.

Related errors


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