nodejs/node · error · NotImplementedError

--generator_output not implemented for eclipse

Error message

--generator_output not implemented for eclipse

What it means

Raised by the eclipse GYP generator's GenerateOutput as a NotImplementedError when the --generator-output (generator_output) option is set. The eclipse generator writes its output alongside the source tree and does not support relocating generated files to a separate output directory. This is an explicit design limitation, not a bug.

Source

Thrown at tools/gyp/pylib/gyp/generator/eclipse.py:452

                    # break if 'src' or 'java' exists in the package structure. This
                    # could be further improved by inspecting the java file for the
                    # package name if this proves to be too fragile in practice.
                    parent_search = dir_
                    while os.path.basename(parent_search) not in ["src", "java"]:
                        parent_search, _ = os.path.split(parent_search)
                        if not parent_search or parent_search == toplevel_dir:
                            # Didn't find a known root, just return the original path
                            yield dir_
                            break
                    else:
                        yield parent_search


def GenerateOutput(target_list, target_dicts, data, params):
    """Generate an XML settings file that can be imported into a CDT project."""

    if params["options"].generator_output:
        raise NotImplementedError("--generator_output not implemented for eclipse")

    if user_config := params.get("generator_flags", {}).get("config", None):
        GenerateOutputForConfig(target_list, target_dicts, data, params, user_config)
    else:
        config_names = target_dicts[target_list[0]]["configurations"]
        for config_name in config_names:
            GenerateOutputForConfig(
                target_list, target_dicts, data, params, config_name
            )

View on GitHub (pinned to 1b2de5e052)

Solutions

  1. Remove --generator-output from the gyp command line when using the eclipse generator.
  2. If you need isolated output, switch to a generator that supports --generator-output (make, ninja, msvs).
  3. Adjust shared build scripts to conditionally pass --generator-output only for supported generators.

Example fix

# before
gyp --depth=. -f eclipse --generator-output=out
# after
gyp --depth=. -f eclipse
Defensive patterns

Strategy: validation

Validate before calling

options = parse_args()
if options.generator_format == 'eclipse' and options.generator_output:
    raise SystemExit('--generator-output is unsupported with -f eclipse')

Try / catch

try:
    GenerateOutput(...)
except NotImplementedError as e:
    if 'generator_output' in str(e):
        rerun_without_generator_output()
    raise

Prevention

When it happens

Trigger: Invoking gyp with both `-f eclipse` and `--generator-output=<dir>` (or setting generator_output in any way that makes params['options'].generator_output truthy at eclipse.py:453).

Common situations: Copying a gyp invocation from a make/ninja workflow that uses --generator-output and forgetting to drop it for eclipse; a shared build script that unconditionally passes --generator-output across all generators.

Related errors


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