{"record":{"id":"084c4fc18c4ce7f8","repo":"slint-ui/slint","slug":"cmd-args-join-failed-e-code-n-e","errorCode":null,"errorMessage":"${cmd} ${args.join(\" \")} failed (${e.code}):\\n${e.stdout}\\n${e.stderr}","messagePattern":"(.+?) (.+?) failed \\((.+?)\\):\\\\n(.+?)\\\\n(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"api/node/scripts/packaging.mts","lineNumber":70,"sourceCode":"export async function run(\n    cmd: string,\n    args: string[],\n    opts: { cwd?: string; env?: NodeJS.ProcessEnv } = {},\n): Promise<RunResult> {\n    try {\n        const { stdout, stderr } = await execFileAsync(cmd, args, {\n            encoding: \"utf8\",\n            maxBuffer: 64 * 1024 * 1024,\n            // npm/npx/pnpm are .cmd shims on Windows, which execFile cannot launch\n            // directly; run through the shell there. (The args below are package\n            // names and ./-relative paths, so no extra quoting is needed.)\n            shell: process.platform === \"win32\",\n            ...opts,\n        });\n        return { stdout, stderr };\n    } catch (error) {\n        const e = error as { stdout?: string; stderr?: string; code?: number };\n        throw new Error(\n            `${cmd} ${args.join(\" \")} failed (${e.code}):\\n${e.stdout}\\n${e.stderr}`,\n        );\n    }\n}\n\nfunction editManifest(\n    file: string,\n    edit: (manifest: Record<string, any>) => void,\n): void {\n    const manifest = JSON.parse(readFileSync(file, \"utf8\"));\n    edit(manifest);\n    writeFileSync(file, `${JSON.stringify(manifest, null, 2)}\\n`);\n}\n\n/** Pack a single platform's prebuilt native binary into an npm package tarball. */\nexport async function packBinary(opts: {\n    config: string; // napi binaries config (binaries.json / binaries-dev.json)\n    target: string; // napi-rs platform suffix, e.g. linux-x64-gnu","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/slint-ui/slint/blob/3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016/api/node/scripts/packaging.mts#L52-L88","documentation":"Error \"${cmd} ${args.join(\" \")} failed (${e.code}):\\n${e.stdout}\\n${e.stderr}\" thrown in slint-ui/slint.","triggerScenarios":"Thrown at api/node/scripts/packaging.mts:70 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the printed stdout and stderr of the failed command to find the root cause.","Verify that the invoked tool is installed and available on PATH."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3fd8f2ec03c2aa8a95d5f4b9daa299c7b8bf4016","analyzedAt":"2026-08-19T23:23:16.610Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}