windmill-labs/windmill · error

Found ${wrongFormatPaths.length} directory(ies) using ${foun

Error message

Found ${wrongFormatPaths.length} directory(ies) using ${foundFormat} format, but wmill.yaml expects ${expectedFormat}:\n${pathList}\n${configHint}

What it means

The CLI supports two directory naming conventions for flows/apps/raw apps: dotted (`.flow`, `.app`, `.raw_app`) and underscored (`__flow`, `__app`, `__raw_app`, selected via `nonDottedPaths: true` in wmill.yaml). Before sync it scans the checkout and throws this error if directories on disk use the opposite convention from what wmill.yaml declares, listing every offending path and how to fix the config.

Source

Thrown at cli/src/commands/sync/sync.ts:2240

      }
      map[path] = content;
    }
    // Note: workspace-specific files for other branches are already filtered out earlier
  }

  if (wrongFormatPaths.length > 0) {
    const isNonDotted = getNonDottedPaths();
    const foundFormat = isNonDotted
      ? ".flow/.app/.raw_app"
      : "__flow/__app/__raw_app";
    const expectedFormat = isNonDotted
      ? "__flow/__app/__raw_app"
      : ".flow/.app/.raw_app";
    const configHint = isNonDotted
      ? "Either remove 'nonDottedPaths: true' from wmill.yaml, or rename these directories to use __flow/__app/__raw_app format."
      : "Either add 'nonDottedPaths: true' to wmill.yaml, or rename these directories to use .flow/.app/.raw_app format.";
    const pathList = wrongFormatPaths.map((p) => `  ${p}`).join("\n");
    throw new Error(
      `Found ${wrongFormatPaths.length} directory(ies) using ${foundFormat} format, but wmill.yaml expects ${expectedFormat}:\n${pathList}\n${configHint}`,
    );
  }

  // A dbt project's descriptor is optional, and the two sides spell "absent"
  // differently: nothing on disk, and nothing in the export (which omits an
  // empty one so a project that never named a descriptor never grows one).
  // Left alone that reads as an addition on every push and a deletion on every
  // pull, forever. Both sides are given the empty descriptor the absence means,
  // so a descriptor-less project reaches a clean sync state.
  for (const key of Object.keys(map)) {
    // Normalized first: the local map's keys are built with `path.join`, so on
    // Windows this reads `__dbt\\dbt_project.yml` and an unnormalized match
    // would synthesize nothing — leaving exactly the perpetual push/pull diff
    // above unguarded, on that platform only.
    if (!key.replaceAll("\\", "/").endsWith("__dbt/dbt_project.yml")) continue;
    const descriptor =
      key.slice(0, -"dbt_project.yml".length) + DBT_DESCRIPTOR_NAME;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Rename the listed directories to match the configured format (e.g. `__flow` → `.flow`) using the names printed in the error's pathList
  2. Alternatively add `nonDottedPaths: true` to wmill.yaml if you want to keep the `__flow/__app/__raw_app` folders
  3. Remove `nonDottedPaths: true` from wmill.yaml if the checkout actually uses dotted directories
  4. Align the team: pick one convention, fix both config and folders, and commit them together

Example fix

// before (wmill.yaml has no nonDottedPaths, disk has __flow/)
my_flow__1/
  __flow/...
// after — either
mv my_flow__1/__flow my_flow__1/.flow
// or, in wmill.yaml
nonDottedPaths: true
Defensive patterns

Strategy: validation

Validate before calling

import { existsSync } from 'fs';
const cfg = JSON.parse(readFileSync('wmill.yaml', 'utf8')); // or parse yaml
const nonDotted = !!cfg.nonDottedPaths;
const prefixes = nonDotted ? ['__flow', '__app', '__raw_app'] : ['.flow', '.app', '.raw_app'];
const wrong = prefixes.map(p => nonDotted ? '.' + p.slice(2) : '__' + p.slice(1))
  .filter(p => existsSync(p));
if (wrong.length) console.error('rename or fix config:', wrong);

Try / catch

try {
  await syncPush(...);
} catch (e) {
  if (String(e).includes('but wmill.yaml expects')) {
    // follow the printed pathList: rename dirs or toggle nonDottedPaths
  } else throw e;
}

Prevention

When it happens

Trigger: Running `wmill sync push/pull` when wmill.yaml says one format (e.g. no nonDottedPaths, i.e. dotted) but directories named `__flow/...` exist on disk (or vice versa). Also triggered after toggling nonDottedPaths without renaming existing directories, or after merging branches that use different conventions.

Common situations: A teammate enabled nonDottedPaths and committed config without renaming folders (or the reverse); copy-pasting folders from another project with the other convention; a migration between old and new CLI conventions.

Related errors


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