oven-sh/bun · error · bun_install::Error

JSONPipeWriterFailed

Error message

JSONPipeWriterFailed

What it means

Serializing or writing a JSON message to the IPC pipe to a child process failed. It fires when the writer thread cannot flush a JSON payload (e.g. serde failure or a closed pipe) during scanner/script IPC.

Solutions

  1. Retry the install — transient pipe closure is the usual cause
  2. Ensure the child process (scanner/script runner) is not being killed externally
  3. Update Bun; IPC writer robustness has improved in newer releases
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/install/error.rs:87 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/31529d91d4b2c86d. Report an issue: GitHub.

Appendix: source

Thrown at src/install/error.rs:87

    #[error("Failed")]
    Failed,
    #[error("UnrecognizedDependencyFormat")]
    UnrecognizedDependencyFormat,
    #[error("No global directory found")]
    NoGlobalDirectoryFound,
    #[error("InvalidPackageID")]
    InvalidPackageID,
    #[error("PartialInstallFailed")]
    PartialInstallFailed,
    #[error("NoPackagesInstalled")]
    NoPackagesInstalled,
    #[error("SecurityScannerInWorkspace")]
    SecurityScannerInWorkspace,
    #[error("SecurityScannerRetryFailed")]
    SecurityScannerRetryFailed,
    #[error("IPCPipeFailed")]
    IPCPipeFailed,
    #[error("JSONPipeWriterFailed")]
    JSONPipeWriterFailed,
    #[error("ProcessWatchFailed")]
    ProcessWatchFailed,
    #[error("SecurityScannerProcessFailedWithoutExitStatus")]
    SecurityScannerProcessFailedWithoutExitStatus,
    #[error("NoSecurityScanData")]
    NoSecurityScanData,
    #[error("InvalidIPCMessage")]
    InvalidIPCMessage,
    #[error("InvalidIPCFormat")]
    InvalidIPCFormat,
    #[error("MissingIPCType")]
    MissingIPCType,
    #[error("InvalidIPCType")]
    InvalidIPCType,
    #[error("MissingErrorCode")]
    MissingErrorCode,
    #[error("InvalidErrorCode")]

View on GitHub (pinned to 8c5296ac45)