{"record":{"id":"29a8491fd87cc53e","repo":"zed-industries/zed","slug":"prettier-dir-prettier-dir-is-not-a-directory","errorCode":null,"errorMessage":"Prettier dir {prettier_dir:?} is not a directory","messagePattern":"Prettier dir (.+?) is not a directory","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/prettier/src/prettier.rs","lineNumber":299,"sourceCode":"    ) -> anyhow::Result<Self> {\n        Ok(Self::Test(TestPrettier {\n            default: prettier_dir == default_prettier_dir().as_path(),\n            prettier_dir,\n        }))\n    }\n\n    #[cfg(not(any(test, feature = \"test-support\")))]\n    pub async fn start(\n        server_id: LanguageServerId,\n        prettier_dir: PathBuf,\n        node: NodeRuntime,\n        request_timeout: Duration,\n        mut cx: AsyncApp,\n    ) -> anyhow::Result<Self> {\n        use lsp::{LanguageServerBinary, LanguageServerName};\n\n        let executor = cx.background_executor().clone();\n        anyhow::ensure!(\n            prettier_dir.is_dir(),\n            \"Prettier dir {prettier_dir:?} is not a directory\"\n        );\n        let prettier_server = default_prettier_dir().join(PRETTIER_SERVER_FILE);\n        anyhow::ensure!(\n            prettier_server.is_file(),\n            \"no prettier server package found at {prettier_server:?}\"\n        );\n\n        let node_path = executor\n            .spawn(async move { node.binary_path().await })\n            .await?;\n        let server_name = LanguageServerName(\"prettier\".into());\n        let server_binary = LanguageServerBinary {\n            path: node_path,\n            arguments: vec![prettier_server.into(), prettier_dir.as_path().into()],\n            env: None,\n        };","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/prettier/src/prettier.rs#L281-L317","documentation":"Prettier::start's entry guard found that the resolved prettier_dir path exists but is not a directory (or does not exist at all). The expected prettier installation directory is missing or malformed, so the prettier server cannot be launched from it.","triggerScenarios":"Thrown at crates/prettier/src/prettier.rs:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall prettier dependencies so the expected directory structure exists","Check that prettier_dir was resolved to the real node_modules path and was not corrupted by symlink or path-style issues"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}