nodejs/node · error · MBErr

mb config file %s has problems:

Error message

mb config file %s has problems:

What it means

mb.py validates the mb_config.pyl mixin graph during ReadConfigFile(). It collects two classes of error: a mixin referenced inside another mixin's 'mixins' list that is not itself defined ('Unknown mixin'), and a defined mixin that nothing references ('Unreferenced mixin'). If any errors accumulate, it raises MBErr listing all problems against the config file path.

Source

Thrown at deps/v8/tools/mb/mb.py:483

        if not mixin in self.mixins:
          errs.append('Unknown mixin "%s" referenced by config "%s".' %
                      (mixin, config))
        referenced_mixins.add(mixin)

    for mixin in self.mixins:
      for sub_mixin in self.mixins[mixin].get('mixins', []):
        if not sub_mixin in self.mixins:
          errs.append('Unknown mixin "%s" referenced by mixin "%s".' %
                      (sub_mixin, mixin))
        referenced_mixins.add(sub_mixin)

    # Check that every mixin defined is actually referenced somewhere.
    for mixin in self.mixins:
      if not mixin in referenced_mixins:
        errs.append('Unreferenced mixin "%s".' % mixin)

    if errs:
      raise MBErr(('mb config file %s has problems:' % self.args.config_file) +
                    '\n  ' + '\n  '.join(errs))

    if print_ok:
      self.Print('mb config file %s looks ok.' % self.args.config_file)
    return 0

  def GetConfig(self):
    build_dir = self.args.path[0]

    vals = self.DefaultVals()
    if self.args.builder or self.args.builder_group or self.args.config:
      vals = self.Lookup()
      # Re-run gn gen in order to ensure the config is consistent with the
      # build dir.
      self.RunGNGen(vals)
      return vals

    toolchain_path = self.PathJoin(self.ToAbsPath(build_dir),

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Read the full error list — it names every offending mixin; fix each 'Unknown mixin' (correct the spelling / define it) and each 'Unreferenced mixin' (remove it or wire it to a builder).
  2. Run `mb.py validate --config <file> -f <file>` to re-check after edits until it reports 'looks ok'.
  3. For a merge conflict, resolve the conflict fully so both sides' mixin definitions and references are consistent.

Example fix

// before
  'mixins': {
    'shared': {...},
    'mybuilder': {'mixins': ['shard']},   // typo: 'shard' undefined
  }
// after
  'mixins': {
    'shared': {...},
    'mybuilder': {'mixins': ['shared']},
  }
Defensive patterns

Strategy: validation

Validate before calling

errs = []
referenced = set()
for m, defn in mixins.items():
    for sub in defn.get('mixins', []):
        if sub not in mixins: errs.append(f'Unknown mixin {sub!r} in {m!r}')
        referenced.add(sub)
for m in mixins:
    if m not in referenced: errs.append(f'Unreferenced mixin {m!r}')
assert not errs, errs

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: Running `mb.py analyze`/`gen`/`lookup` after editing mb_config.pyl such that a mixin name is misspelled (referenced but undefined) or a mixin was removed from all builders but left defined. The validator gathers all errs and raises if the list is non-empty.

Common situations: Renaming a mixin but forgetting to update a builder that uses it; deleting a builder that was the sole consumer of a mixin (leaving it unreferenced); merge conflicts in mb_config.pyl leaving a dangling reference.

Related errors


AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13). Data as JSON: /api/errors/e73716f712d632df. Report an issue: GitHub.