windmill-labs/windmill · error

Overwriting existing '${folderName}' (--overwrite)

Error message

Overwriting existing '${folderName}' (--overwrite)

What it means

Heads-up from `wmill app new`: the target raw_app folder already exists and --overwrite was given, so the command will delete and regenerate its contents. Purely informational — anything inside the existing folder not regenerated by the scaffold is lost.

Source

Thrown at cli/src/commands/app/new.ts:597

  // Load nonDottedPaths setting from wmill.yaml before creating folder
  await loadNonDottedPathsSetting();

  // Create the directory structure - preserve full path (e.g., f/foobar/x/y becomes f/foobar/x/y.raw_app)
  const folderName = buildFolderPath(appPath, "raw_app");
  const appDir = path.join(process.cwd(), folderName);

  // Check if directory already exists
  let dirExists = false;
  try {
    await stat(appDir);
    dirExists = true;
  } catch {
    // Directory doesn't exist, which is good
  }
  if (dirExists) {
    if (opts.overwrite) {
      log.warn(colors.yellow(`Overwriting existing '${folderName}' (--overwrite)`));
    } else if (nonInteractive) {
      log.error(
        colors.red(
          `Directory '${folderName}' already exists. Pass --overwrite to replace it.`
        )
      );
      return;
    } else {
      const overwrite = await Confirm.prompt({
        message: `Directory '${folderName}' already exists. Overwrite?`,
        default: false,
      });
      if (!overwrite) {
        log.info(colors.yellow("Aborted."));
        return;
      }
    }
    // Wipe before re-creating so leftover files from a different framework

View on GitHub (pinned to e474e8803c)

Solutions

  1. Commit or back up the existing folder before using --overwrite
  2. Remove --overwrite to be stopped by the exists-check instead
  3. Point the command at a different path if the old app must be kept
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at cli/src/commands/app/new.ts:597 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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