bmad-code-org/BMAD-METHOD · error · Error

--set "${entry}": missing '.'. Expected <module>.<key>=<valu

Error message

--set "${entry}": missing '.'. Expected <module>.<key>=<value>

What it means

Thrown by parseSetEntry when the LHS (before '=') has no '.' separator, so it can't be split into module and key. The <module>.<key> shape is mandatory; a bare identifier has no module scope.

Source

Thrown at tools/installer/set-overrides.js:50

 * @returns {{module: string, key: string, value: string}}
 * @throws {Error} on malformed input
 */
function parseSetEntry(entry) {
  if (typeof entry !== 'string' || entry.length === 0) {
    throw new Error('--set: empty entry. Expected <module>.<key>=<value>');
  }
  const eq = entry.indexOf('=');
  if (eq === -1) {
    throw new Error(`--set "${entry}": missing '='. Expected <module>.<key>=<value>`);
  }
  const lhs = entry.slice(0, eq);
  // Note: only the LHS is trimmed. Values may legitimately contain leading
  // or trailing whitespace (paths with spaces, quoted strings); module / key
  // names cannot, so it's safe to be strict on the left.
  const value = entry.slice(eq + 1);
  const dot = lhs.indexOf('.');
  if (dot === -1) {
    throw new Error(`--set "${entry}": missing '.'. Expected <module>.<key>=<value>`);
  }
  const moduleCode = lhs.slice(0, dot).trim();
  const key = lhs.slice(dot + 1).trim();
  if (!moduleCode || !key) {
    throw new Error(`--set "${entry}": empty module or key. Expected <module>.<key>=<value>`);
  }
  if (PROTOTYPE_POLLUTING_NAMES.has(moduleCode) || PROTOTYPE_POLLUTING_NAMES.has(key)) {
    throw new Error(
      `--set "${entry}": '__proto__', 'prototype', and 'constructor' are reserved and cannot be used as a module or key name.`,
    );
  }
  return { module: moduleCode, key, value };
}

/**
 * Parse repeated `--set` entries into a `{ module: { key: value } }` map.
 * Later entries overwrite earlier ones for the same key. Both the outer
 * map and the per-module inner maps are `Object.create(null)` so callers

View on GitHub (pinned to b70486b9bd)

Solutions

  1. Prefix the key with the module code and a dot: bmm.project_knowledge=research.
  2. Verify the module code against _bmad/manifest.json or the directory name under _bmad/.

Example fix

# before
#   --set project_knowledge=research
#
# after
#   --set bmm.project_knowledge=research
Defensive patterns

Strategy: validation

Validate before calling

function hasModuleDot(entry) {
  const eq = entry.indexOf('=');
  if (eq === -1) return false;
  return entry.slice(0, eq).indexOf('.') !== -1;
}
const entries = raw.filter(hasModuleDot);

Type guard

function isValidSetEntry(entry) {
  return typeof entry === 'string' && /^[^.\s]+\.[^.\s]+=.+$/.test(entry);
}

Try / catch

try {
  overrides = parseSetEntries(entries);
} catch (e) {
  if (/missing '.'/.test(e.message)) {
    // ask the user for the module prefix and re-emit
  } else { throw e; }
}

Prevention

When it happens

Trigger: Passing --set project_knowledge=research (no module prefix) or --set bmm=research (no key, no dot).

Common situations: User omits the module code; typo on the dot; copy-paste from docs that used a shorthand; assuming the currently installed module is implicit.

Related errors


AI-assisted analysis of bmad-code-org/BMAD-METHOD@b70486b9bd (2026-08-13). Data as JSON: /api/errors/c8a2abd95e08714a. Report an issue: GitHub.