{"record":{"id":"780ff678f1f214ba","repo":"DioxusLabs/dioxus","slug":"failed-to-execute-process","errorCode":null,"errorMessage":"failed to execute process","messagePattern":"failed to execute process","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cli/src/cli/create.rs","lineNumber":183,"sourceCode":"    metadata.and_then(|metadata| {\n        let cargo_toml_path = &metadata.workspace_root.join(\"Cargo.toml\");\n        let cargo_toml_str = std::fs::read_to_string(cargo_toml_path).ok()?;\n        let relative_path = path.strip_prefix(metadata.workspace_root).ok()?;\n\n        let mut cargo_toml: toml_edit::DocumentMut = cargo_toml_str.parse().ok()?;\n        cargo_toml\n            .get_mut(\"workspace\")?\n            .get_mut(\"members\")?\n            .as_array_mut()?\n            .push(relative_path.display().to_string());\n\n        std::fs::write(cargo_toml_path, cargo_toml.to_string()).ok()\n    });\n\n    // 2. Run `cargo fmt` on the new project.\n    let mut cmd = Command::new(\"cargo\");\n    let cmd = cmd.arg(\"fmt\").current_dir(path);\n    let output = cmd.output().expect(\"failed to execute process\");\n    if !output.status.success() {\n        tracing::error!(dx_src = ?TraceSrc::Dev, \"cargo fmt failed\");\n        tracing::error!(dx_src = ?TraceSrc::Build, \"stdout: {}\", String::from_utf8_lossy(&output.stdout));\n        tracing::error!(dx_src = ?TraceSrc::Build, \"stderr: {}\", String::from_utf8_lossy(&output.stderr));\n    }\n\n    // 3. Format the `Cargo.toml` and `Dioxus.toml` files.\n    let toml_paths = [path.join(\"Cargo.toml\"), path.join(\"Dioxus.toml\")];\n    for toml_path in &toml_paths {\n        let Ok(toml) = std::fs::read_to_string(toml_path) else {\n            continue;\n        };\n\n        let mut toml = toml.parse::<toml_edit::DocumentMut>().map_err(|e| {\n            anyhow::anyhow!(\"failed to parse toml at {}: {}\", toml_path.display(), e)\n        })?;\n\n        toml.as_table_mut().fmt();","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/cli/create.rs#L165-L201","documentation":"`post_create` spawns a process (adding the new project to the workspace) and panics with this message if spawning fails — e.g. the child executable is missing or not runnable. It is a generic std::process failure indicator during the create command's post-processing.","triggerScenarios":"Thrown at packages/cli/src/cli/create.rs:183 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the required executable (e.g. cargo or the project template tool) is installed and on PATH, and that the current directory is accessible."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}