{"record":{"id":"c5513b002c8fccfe","repo":"zed-industries/zed","slug":"error","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/node_runtime/src/node_runtime.rs","lineNumber":1078,"sourceCode":"        }\n        None => bail!(\"npm package {name} declares no executable\"),\n    };\n\n    Ok(package_directory.join(relative_path))\n}\n\n#[derive(Clone)]\npub struct UnavailableNodeRuntime {\n    error_message: Arc<String>,\n}\n\n#[async_trait::async_trait]\nimpl NodeRuntimeTrait for UnavailableNodeRuntime {\n    fn boxed_clone(&self) -> Box<dyn NodeRuntimeTrait> {\n        Box::new(self.clone())\n    }\n    fn binary_path(&self) -> Result<PathBuf> {\n        bail!(\"{}\", self.error_message)\n    }\n\n    async fn run_npm_subcommand(\n        &self,\n        _: Option<&Path>,\n        _: Option<&Url>,\n        _: &str,\n        _: &[&str],\n    ) -> anyhow::Result<Output> {\n        bail!(\"{}\", self.error_message)\n    }\n\n    async fn npm_command(\n        &self,\n        _: Option<&Path>,\n        _proxy: Option<&Url>,\n        _subcommand: &str,\n        _args: &[&str],","sourceCodeStart":1060,"sourceCodeEnd":1096,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/node_runtime/src/node_runtime.rs#L1060-L1096","documentation":"UnavailableNodeRuntime is the stub NodeRuntimeTrait created when the real Node runtime failed to initialize (download/install failure, unsupported platform). Its binary_path() bails with the stored root-cause error message, so any feature that later asks for the node binary path resurfaces the original failure text verbatim.","triggerScenarios":"The real runtime failed to construct (offline install, nodejs.org unreachable, unsupported OS/arch), and then some component calls binary_path() on the unavailable stub — e.g. an extension or tool requesting the node executable path.","commonSituations":"First run without network; corporate proxy blocking nodejs.org; disk-full in the data dir during install; afterwards every node-dependent feature (prettier, language servers, extensions) shows this message.","solutions":["Read the embedded message — it is the root cause (network, platform, disk); fix that first","Restore network/proxy access to https://nodejs.org and restart Zed to retry the install","Free space / fix permissions under the data dir (~/Library/Application Support/Zed, ~/.local/share/zed) and retry","If the platform is unsupported, supply a system Node and/or run on a supported platform"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// After startup, probe availability cheaply before asking for paths:\nfn runtime_available(rt: &dyn NodeRuntimeTrait) -> bool {\n    rt.binary_path().is_ok()\n}","typeGuard":null,"tryCatchPattern":"match runtime.binary_path() {\n    Err(err) => {\n        // err carries the ORIGINAL init failure; surface that, not a generic message\n        show_diagnostic(\"Node runtime unavailable: {err}\");\n        offer_retry_of_runtime_install().await;\n    }\n    Ok(path) => path,\n}","preventionTips":["Treat any UnavailableNodeRuntime error text as the root cause of an earlier install failure — read it fully","Ensure network access to nodejs.org on first run (proxy, offline mode)","Surface a retry-install action in UI instead of dead-ending the feature"],"tags":["node-runtime","stub","install-failure","environment"],"backgroundTag":"node-runtime-unavailable","analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}