{"record":{"id":"6420b429bf333bf0","repo":"oven-sh/bun","slug":"no-global-directory-found","errorCode":null,"errorMessage":"No global directory found","messagePattern":"No global directory found","errorType":"error_code","errorClass":"bun_install::Error","httpStatus":null,"severity":"error","filePath":"src/install/error.rs","lineNumber":73,"sourceCode":"    #[error(\"LockfileResolveFailed\")]\n    LockfileResolveFailed,\n    #[error(\"DistTagNotFound\")]\n    DistTagNotFound,\n    #[error(\"NoMatchingVersion\")]\n    NoMatchingVersion,\n    #[error(\"TooRecentVersion\")]\n    TooRecentVersion,\n    #[error(\"MissingPackageJSON\")]\n    MissingPackageJSON,\n    #[error(\"InstallFailed\")]\n    InstallFailed,\n    #[error(\"HTTPError\")]\n    HTTPError,\n    #[error(\"Failed\")]\n    Failed,\n    #[error(\"UnrecognizedDependencyFormat\")]\n    UnrecognizedDependencyFormat,\n    #[error(\"No global directory found\")]\n    NoGlobalDirectoryFound,\n    #[error(\"InvalidPackageID\")]\n    InvalidPackageID,\n    #[error(\"PartialInstallFailed\")]\n    PartialInstallFailed,\n    #[error(\"NoPackagesInstalled\")]\n    NoPackagesInstalled,\n    #[error(\"SecurityScannerInWorkspace\")]\n    SecurityScannerInWorkspace,\n    #[error(\"SecurityScannerRetryFailed\")]\n    SecurityScannerRetryFailed,\n    #[error(\"IPCPipeFailed\")]\n    IPCPipeFailed,\n    #[error(\"JSONPipeWriterFailed\")]\n    JSONPipeWriterFailed,\n    #[error(\"ProcessWatchFailed\")]\n    ProcessWatchFailed,\n    #[error(\"SecurityScannerProcessFailedWithoutExitStatus\")]","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/error.rs#L55-L91","documentation":"Variant of the install Error enum whose message is human text: `bun add -g` (or any global operation) could not locate a global install directory — neither an explicitly configured one nor a discoverable default on this system. The installer has no prefix under which to place global packages, so it aborts.","triggerScenarios":"Thrown at src/install/error.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set BUN_INSTALL to a writable directory (e.g. export BUN_INSTALL=$HOME/.bun)","Ensure the directory exists and is writable; create it if needed","Avoid running global installs where $HOME is unset or read-only"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}