{"record":{"id":"85ce1a8fecc49515","repo":"Hmbown/CodeWhale","slug":"dsh-plugin-path-not-available-reason","errorCode":null,"errorMessage":"DSH plugin path not available: {reason}","messagePattern":"DSH plugin path not available: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":390,"sourceCode":"            );\n            Ok(())\n        }\n        DshIntegrationCommand::Enable => {\n            let paths = DshPaths::from_process()?;\n            let record = dsh::set_disabled(&paths, false)?;\n            println!(\"enabled: {}\", record.overlay_path.display());\n            Ok(())\n        }\n        DshIntegrationCommand::InstallBundle { app, yes } => {\n            let app = dsh::DshAppBundle::parse(&app)\n                .ok_or_else(|| anyhow::anyhow!(\"--app must be `web` or `headless`, got `{app}`\"))?;\n            let (paths, report) = status_report(config, workspace, false)?;\n            ensure_launchable_dsh(&report)?;\n            let record = report.record.as_ref().ok_or_else(|| {\n                anyhow::anyhow!(\"DSH is not connected; run `{CLI_COMMAND} connect` first\")\n            })?;\n            if let dsh::BundleAvailability::NotAvailable { reason } = &report.bundle_availability {\n                anyhow::bail!(\"DSH plugin path not available: {reason}\");\n            }\n            if matches!(report.state, DshIntegrationState::StaleConfig { .. }) {\n                anyhow::bail!(\"overlay is stale; run `{CLI_COMMAND} update` before install-bundle\");\n            }\n            let app_source = dsh::bundle::app_bundle_source(\n                report\n                    .detection\n                    .binary\n                    .as_ref()\n                    .ok_or_else(|| anyhow::anyhow!(\"dsh binary path is unknown\"))?,\n                app,\n            )?;\n            let profile_dir = report\n                .detection\n                .dsh_home\n                .join(\"profiles\")\n                .join(dsh::bundle::BUNDLE_PROFILE);\n            println!(\"{RELATIONSHIP_LABEL} — install-bundle plan (nothing written yet)\");","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/integrations/cli.rs#L372-L408","documentation":"`install-bundle` composes bundles through dsh's documented plugin path, which shells out to pnpm (`dsh plugin --profile codewhale add <path>`). Before touching anything it checks `report.bundle_availability`; `NotAvailable { reason }` means the pnpm probe failed — either `pnpm --version` exited non-zero or pnpm could not be executed at all (crates/tui/src/integrations/dsh/bundle.rs:137-142 produces the two reason strings).","triggerScenarios":"`install-bundle` when pnpm is absent from PATH, present but broken (bad node shim, wrong architecture, corrupted install), or when `pnpm --version` itself exits non-zero. The `{reason}` says which case it was: 'pnpm could not be run: …' versus 'pnpm --version exited non-zero'.","commonSituations":"npm-only Node installs; pnpm provided via corepack but corepack not enabled; minimal CI images without pnpm; Windows where pnpm.cmd is not visible to the spawning process's PATH; nvm shim paths missing in non-login shells.","solutions":["Install pnpm (`npm i -g pnpm` or `corepack enable && corepack prepare pnpm@latest --activate`) and confirm `pnpm --version` succeeds in the same shell you run Codewhale from","If the reason says exited non-zero, run `pnpm --version` manually to see pnpm's own error output","Check availability without side effects: `codewhale integrations dsh status` prints a `dsh plugin path (bundle):` line","Remember only bundle install/remove needs pnpm — `connect`, `update`, and `launch` never invoke it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if !matches!(\n    dsh::bundle_availability_now(),\n    dsh::BundleAvailability::Available { .. }\n) {\n    eprintln!(\"install pnpm first: npm i -g pnpm\");\n    return Ok(());\n}","typeGuard":"fn pnpm_ready(availability: &dsh::BundleAvailability) -> bool {\n    matches!(availability, dsh::BundleAvailability::Available { .. })\n}","tryCatchPattern":null,"preventionTips":["Probe `pnpm --version` in provisioning scripts before any install-bundle step","Install pnpm via corepack in Node-based environments so it tracks the project","Remember connect/update/launch never need pnpm — scope the pnpm requirement to bundle commands only"],"tags":["rust","dsh","pnpm","environment","path"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}