lerna/lerna · error · ValidationError

ETWOFACTOR

ETWOFACTOR

Error message

Unable to obtain two-factor auth mode

What it means

Error "Unable to obtain two-factor auth mode" thrown in lerna/lerna.

Source

Thrown at libs/commands/publish/src/lib/get-two-factor-auth-required.ts:48

  function failure(err: any) {
    // pass if registry does not support profile endpoint
    if (err.code === "E500" || err.code === "E404") {
      // most likely a private registry (npm Enterprise, verdaccio, etc)
      opts.log.warn(
        "EREGISTRY",
        `Registry "${opts.registry}" does not support 'npm profile get', skipping two-factor auth check...`
      );

      // don't log redundant errors
      return false;
    }

    // Log the error cleanly to stderr
    opts.log.pause();
    console.error(err.message);
    opts.log.resume();

    throw new ValidationError("ETWOFACTOR", "Unable to obtain two-factor auth mode");
  }
}

View on GitHub (pinned to 35d15a1567)

When it happens

Trigger: Thrown at libs/commands/publish/src/lib/get-two-factor-auth-required.ts:48 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of lerna/lerna@35d15a1567 (2026-08-27). Data as JSON: /api/errors/e6f689c9d167aabe. Report an issue: GitHub.