nodejs/node · error · MBErr
Unknown mixin "%s"
Error message
Unknown mixin "%s"
What it means
During config flattening, MB walks the mixin list of a config (and recursively any nested 'mixins'). Each name must exist in the top-level `mixins` map of the mb config file. An undefined reference aborts flattening.
Source
Thrown at deps/v8/tools/mb/mb.py:653
def FlattenConfig(self, config):
mixins = self.configs[config]
vals = self.DefaultVals()
visited = []
self.FlattenMixins(mixins, vals, visited)
return vals
def DefaultVals(self):
return {
'args_file': '',
'cros_passthrough': False,
'gn_args': '',
}
def FlattenMixins(self, mixins, vals, visited):
for m in mixins:
if m not in self.mixins:
raise MBErr('Unknown mixin "%s"' % m)
visited.append(m)
mixin_vals = self.mixins[m]
if 'cros_passthrough' in mixin_vals:
vals['cros_passthrough'] = mixin_vals['cros_passthrough']
if 'args_file' in mixin_vals:
if vals['args_file']:
raise MBErr('args_file specified multiple times in mixins '
'for %s on %s' %
(self.args.builder, self.args.builder_group))
vals['args_file'] = mixin_vals['args_file']
if 'gn_args' in mixin_vals:
if vals['gn_args']:
vals['gn_args'] += ' ' + mixin_vals['gn_args']
else:
vals['gn_args'] = mixin_vals['gn_args']View on GitHub (pinned to 1b2de5e052)
Solutions
- Grep the mb config file for the named mixin to confirm it is undefined.
- Add the missing mixin definition under the top-level mixins map.
- Correct the typo in the referencing config/mixin.
Example fix
// before 'mixins': ['linux', 'relase'] // typo: 'relase' // after 'mixins': ['linux', 'release']
Defensive patterns
Strategy: validation
Validate before calling
# Lint the mb config: every referenced mixin must be defined.
import astpp # or json if config is JSON
cfg = load_mb_config(config_file)
known = set(cfg['mixins'].keys())
def check(mixins):
for m in mixins:
assert m in known, f"unknown mixin {m!r}"
if 'mixins' in cfg['mixins'][m]:
check(cfg['mixins'][m]['mixins'])
for name, entry in cfg['configs'].items():
if isinstance(entry, dict):
for phase, c in entry.items():
check(c.get('mixins', []))
else:
check(entry.get('mixins', [])) Prevention
- Run the config lint in presubmit/CI whenever mb_config files change.
- When renaming/removing a mixin, grep all configs for references.
When it happens
Trigger: A config or mixin references 'mixins': ['foo', 'bar'] where 'bar' is not declared under the config file's top-level mixins: block (includes transitively referenced mixins).
Common situations: Typo in a mixin name; mixin renamed/removed without updating all references; a merge that left a dangling reference; copy-paste of a config without its dependency mixins.
Related errors
- args_file specified multiple times in mixins for %s on %s
- Phase %s doesn't exist for %s on %s
- Must not specify a build --phase for %s on %s
- Cannot generate isolate for %s since it is an additional_com
- did not generate any of %s
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/638f9df4d5ec7bbe.
Report an issue: GitHub.