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 entry has no '=' separator. Without '=', there is no value side; the function refuses to guess where LHS ends and value begins. Note only the LHS is trimmed, so '=' placement is strict.

Source

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

const PROTOTYPE_POLLUTING_NAMES = new Set(['__proto__', 'prototype', 'constructor']);

const path = require('node:path');
const fs = require('./fs-native');
const yaml = require('yaml');

/**
 * Parse a single `--set <module>.<key>=<value>` entry.
 * @param {string} entry - raw flag value
 * @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.`,

View on GitHub (pinned to b70486b9bd)

Solutions

  1. Add =<value> to the argument.
  2. If the value contains spaces or shell-special characters, quote the whole argument: --set 'bmm.key=value with spaces'.
  3. Double-check that an earlier shell token didn't consume the '='.

Example fix

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

Strategy: validation

Validate before calling

function hasEquals(entry) { return typeof entry === 'string' && entry.indexOf('=') !== -1; }
const entries = raw.filter(hasEquals);
const overrides = parseSetEntries(entries);

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)) {
    // prompt the user for the missing value, or drop the entry
  } else { throw e; }
}

Prevention

When it happens

Trigger: Passing --set bmm.project_knowledge (no =value); a quoting accident that strips everything after the key; typo omitting the value.

Common situations: User forgets the =value portion; shell splits an unquoted argument; copy-paste from notes that abbreviated the format.

Related errors


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