{"record":{"id":"94c20f25a098d62b","repo":"denisidoro/navi","slug":"failed-to-call-tldr-output-error-no","errorCode":null,"errorMessage":"Failed to call:\ntldr {}\n\nOutput:\n{}\n\nError:\n{}\n\nNote:\nThe client.tealdeer config option can be set to enable tealdeer support.\nIf you want to use another client, please make sure it supports the --markdown flag.\nIf you are already using a supported version you can ignore this message.\n{}\n","messagePattern":"Failed to call:\ntldr (.+?)\n\nOutput:\n(.+?)\n\nError:\n(.+?)\n\nNote:\nThe client\\.tealdeer config option can be set to enable tealdeer support\\.\nIf you want to use another client, please make sure it supports the --markdown flag\\.\nIf you are already using a supported version you can ignore this message\\.\n(.+?)\n","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"src/clients/tldr.rs","lineNumber":112,"sourceCode":"\nOutput:\n{}\n\nError:\n{}\n\nNote:\nThe client.tealdeer config option can be set to enable tealdeer support.\nIf you want to use another client, please make sure it supports the --markdown flag.\nIf you are already using a supported version you can ignore this message.\n{}\n\",\n            args.join(\" \"),\n            String::from_utf8(out.stdout).unwrap_or_else(|_e| \"Unable to get output message\".to_string()),\n            String::from_utf8(out.stderr).unwrap_or_else(|_e| \"Unable to get error message\".to_string()),\n            VERSION_DISCLAIMER,\n        );\n        Err(anyhow!(msg))\n    }\n}\n","sourceCodeStart":94,"sourceCodeEnd":115,"githubUrl":"https://github.com/denisidoro/navi/blob/f7330b9ad5bd95b7d1a3c96d00e0a77deb589147/src/clients/tldr.rs#L94-L115","documentation":"When the spawned tldr client exits non-zero, navi returns an error with the command line, stdout, stderr, and guidance: navi expects a client supporting `--markdown` (or the client.tealdeer option for tealdeer). Many tldr clients (notably the original Node client in newer versions) dropped or never had --markdown, so the command fails even though the client is installed.","triggerScenarios":"`call` -> tldr exits non-zero: unsupported/unknown flag like --markdown rejected by the client, page not found (client exit code), network errors inside the client, or an unsupported client version.","commonSituations":"Using the Node tldr client v3+ which removed --markdown, using another client (e.g. a Go/Rust tldr) with different flags, tldr cache not initialized (tealdeer requires `tldr --update`), or simply querying a nonexistent page.","solutions":["Switch to tealdeer and set navi's client.tealdeer config option, or install a client that supports --markdown","Run the exact `tldr ...` command from the error manually to see the client's own error","Initialize/update the client cache (`tldr --update`) if it complains about a missing cache","Update the page name if the client reported the page wasn't found"],"exampleFix":"// before\n$ tldr --markdown tar\ntldr: unknown option -- markdown\nFailed to call:\ntldr --markdown tar ...\n// after\n$ cargo install tealdeer\n$ tldr --update\n$ navi   # with client.tealdeer = true in config.toml","handlingStrategy":"fallback","validationCode":"// ensure the client supports --markdown before relying on it\nfn supports_markdown_flag() -> bool {\n    let out = std::process::Command::new(\"tldr\").arg(\"--help\").output();\n    out.map(|o| String::from_utf8_lossy(&o.stdout).contains(\"--markdown\")).unwrap_or(false)\n}\nif !supports_markdown_flag() {\n    eprintln!(\"your tldr client lacks --markdown; use tealdeer with client.tealdeer=true\");\n}","typeGuard":null,"tryCatchPattern":"match tldr::call(query, opts) {\n    Ok(lines) => render(lines),\n    Err(e) if e.to_string().contains(\"Failed to call\") => {\n        eprintln!(\"tldr exited non-zero; falling back to cheat.sh client\");\n        match cheatsh::call(query, opts) { Ok(l) => render(l), Err(e2) => eprintln!(\"{}\", e2) }\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Use a client that supports --markdown (or tealdeer with client.tealdeer=true)","Pin/upgrade the client to a compatible version","Initialize the client cache (`tldr --update`)","Reproduce failures by running the exact command from the error message"],"tags":["tldr","tealdeer","exit-code","version-incompatibility"],"backgroundTag":"external-command-failed","analyzedSha":"f7330b9ad5bd95b7d1a3c96d00e0a77deb589147","analyzedAt":"2026-09-03T13:58:22.429Z","contentChangedAt":"2026-09-03T13:58:22.429Z","schemaVersion":2},"datasetVersion":"2026-09-10T17:17:09.494Z"}