windmill-labs/windmill · error · Error

No local instance profile named ${instanceName}

Error message

No local instance profile named ${instanceName}

What it means

resolveInstance in the Slack command looks up a local instance profile by the --instance name the user passed and throws this if no saved profile with that exact name exists. It only checks locally stored instances, not the remote server.

Source

Thrown at cli/src/commands/instance/slack.ts:13

import { colors } from "@cliffy/ansi/colors";
import * as log from "../../core/log.ts";
import { setClient } from "../../core/client.ts";
import * as wmill from "../../../gen/services.gen.ts";
import { getActiveInstance, allInstances, Instance } from "./instance.ts";

async function resolveInstance(
  instanceName: string | undefined
): Promise<Instance> {
  if (instanceName) {
    const match = (await allInstances()).find((i) => i.name === instanceName);
    if (!match) {
      throw new Error(`No local instance profile named ${instanceName}`);
    }
    return match;
  }
  const activeName = await getActiveInstance({});
  if (!activeName) {
    throw new Error(
      "No active instance. Run 'wmill instance add' or pass --instance."
    );
  }
  const match = (await allInstances()).find((i) => i.name === activeName);
  if (!match) {
    throw new Error(`Active instance ${activeName} not found in config`);
  }
  return match;
}

export async function connectSlackInstance(opts: {
  instance?: string;

View on GitHub (pinned to e474e8803c)

Solutions

  1. Run 'wmill instance list' (or 'wmill instance') to see saved profile names and fix the typo
  2. Add the missing profile with 'wmill instance add'
  3. Ensure you run as the same user/HOME where the profile exists, or re-add it in CI
  4. Omit --instance so the active instance is used instead

Example fix

// before
wmill instance slack sync --instance prood
// after (fix name or add it)
wmill instance add https://app.windmill.dev <token> --name prod
wmill instance slack sync --instance prod
Defensive patterns

Strategy: validation

Validate before calling

const profiles = await allInstances(); // or read local CLI config
if (!profiles.some(i => i.name === instanceName)) {
  console.warn(`Profile '${instanceName}' not added yet; run 'wmill instance add'`);
}

Try / catch

try {
  await wmillInstanceSlack({ instance: name });
} catch (e) {
  if (String(e).startsWith("No local instance profile named")) {
    console.error(`Unknown profile '${name}'. Run: wmill instance list`);
  }
}

Prevention

When it happens

Trigger: Running 'wmill instance slack ... --instance <name>' where <name> doesn't match any profile added via 'wmill instance add' (typo, removed profile, or config on another machine/HOME).

Common situations: Typo in the instance name; instance was deleted with 'wmill instance delete'; running in CI where the profile was never added; different HOME directory hides the config.

Related errors


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