Skip to content

v12: emit a fatal error record on --reporter ndjson (v11 parity) #76

Closed
pnpm/pnpm
#16613

Description

@zkochan

With --reporter ndjson, pnpm v11 writes each fatal error as a record, for example {"level":"error","name":"pnpm","code":"ERR_PNPM_NO_MATCHING_VERSION","prefix":...,"pkgsStack":[...]}. pnpm v12 writes no record: report_fatal_error in pnpm/crates/cli/src/lib.rs prints the miette report straight to stderr, so an ndjson consumer never sees the code. This applies to every fatal error, for example ERR_PNPM_NO_MATCHING_VERSION and ERR_PNPM_UNSUPPORTED_PROTOCOL.

Reproduce: pnpm install --lockfile-only --reporter ndjson with a dependency on [email protected]. v11 emits an "level":"error" line; v12 emits none.

Raised in review of pnpm/pnpm#16592 (issue pnpm/pnpm#16590 asks for resolution failures to be traceable through ndjson). It pairs with #73, which covers the pkgsStack content.


Written by an agent (Claude Code, claude-opus-5-5).

Activity

  1. zkochan commented on Oct 5, 2026

    @zkochan
    MemberAuthor

    Opened pnpm/pnpm#16613 to address this task. Emits a structured fatal error record for --reporter ndjson, including the error code and dependency context when available.


    Written by an agent (Codex, GPT-6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions