{"record":{"id":"d6e225c6909375e0","repo":"Hmbown/CodeWhale","slug":"dsh-is-not-on-path-install-the-official-deepseek","errorCode":null,"errorMessage":"dsh is not on PATH; install the official DeepSeek Harness first (npm i -g @deepseek-ai/dsh)","messagePattern":"dsh is not on PATH; install the official DeepSeek Harness first \\(npm i -g @deepseek-ai/dsh\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/cli.rs","lineNumber":510,"sourceCode":"                    println!(\"  {}\", path.display());\n                }\n            }\n            println!(\n                \"  (receipt history is kept at {}; $DSH_HOME is never touched)\",\n                paths.receipt.display()\n            );\n            confirm(yes, \"Remove the DSH integration files?\")?;\n            let removed = dsh::remove(&paths)?;\n            println!(\"removed {} file(s)\", removed.len());\n            Ok(())\n        }\n    }\n}\n\nfn ensure_launchable_dsh(report: &DshStatusReport) -> Result<()> {\n    match &report.state {\n        DshIntegrationState::NotInstalled => {\n            anyhow::bail!(\n                \"dsh is not on PATH; install the official DeepSeek Harness first (npm i -g @deepseek-ai/dsh)\"\n            )\n        }\n        DshIntegrationState::Offline { reason } => anyhow::bail!(\"dsh is offline: {reason}\"),\n        DshIntegrationState::Incompatible { reason, .. } => {\n            anyhow::bail!(\"installed dsh is incompatible with this integration: {reason}\")\n        }\n        _ => Ok(()),\n    }\n}\n","sourceCodeStart":492,"sourceCodeEnd":521,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/integrations/cli.rs#L492-L521","documentation":"`ensure_launchable_dsh` gates every mutating dsh subcommand (connect, update, launch, install-bundle) on the integration state. `NotInstalled` means detection found no `dsh` executable anywhere on PATH, and the message points at the official DeepSeek Harness npm package as the install source. The check runs before any file is read or written.","triggerScenarios":"Any of `connect`, `update`, `launch`, or `install-bundle` on a machine where `dsh` is not on PATH — never installed, installed in a different user's npm prefix, or installed via an nvm/asdf shim that the invoking shell has not loaded.","commonSituations":"Fresh machines; dsh installed under a different Node version manager than the active one; CI containers without dsh; macOS .zprofile PATH entries missing in non-login shells; local bins directory (`npm config get prefix`/bin) not on PATH.","solutions":["Install dsh: `npm i -g @deepseek-ai/dsh`","Verify with `which dsh` and `dsh --version` in the same shell you run Codewhale from","If installed but not found, add your npm global bin directory to PATH (`npm config get prefix` shows the prefix)","Re-run `codewhale integrations dsh status`; the `dsh binary:` line must show a path instead of 'not on PATH'"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if which::global(\"dsh\").is_err() {\n    eprintln!(\"install dsh first: npm i -g @deepseek-ai/dsh\");\n    return Ok(());\n}","typeGuard":"fn dsh_installed(report: &DshStatusReport) -> bool {\n    !matches!(report.state, DshIntegrationState::NotInstalled)\n}","tryCatchPattern":null,"preventionTips":["Preflight `which dsh && dsh --version` in setup scripts before any codewhale dsh command","Add the npm global bin directory to PATH in non-login shells (cron, CI)","Run `codewhale integrations dsh status` as the cheap installed/not-installed probe"],"tags":["rust","dsh","path","environment","installation"],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}