{"record":{"id":"784977c3fef34c1c","repo":"remotion-dev/remotion","slug":"toolchain-for-toolchain-not-found-run-node-in","errorCode":null,"errorMessage":"Toolchain for ${toolchain} not found. Run \"node install-toolchain.mjs\" if you want to build all platforms","messagePattern":"Toolchain for (.+?) not found\\. Run \"node install-toolchain\\.mjs\" if you want to build all platforms","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/compositor/build.ts","lineNumber":159,"sourceCode":"if (!hasCargo()) {\n\tconsole.log('Environment has no cargo. Skipping Rust builds.');\n\tprocess.exit(0);\n}\n\nconst nativeArch = getTarget();\n\nconst all = process.argv.includes('--all');\nconst cloudrun = process.argv.includes('--cloudrun');\nconst lambda = process.argv.includes('--lambda');\nif (!existsSync('toolchains') && all) {\n\tthrow new Error(\n\t\t'Run \"bun install-toolchain.ts\" if you want to build all platforms',\n\t);\n}\n\nfor (const toolchain of toolchains) {\n\tif (!existsSync(path.join('toolchains', toolchain)) && all) {\n\t\tthrow new Error(\n\t\t\t`Toolchain for ${toolchain} not found. Run \"node install-toolchain.mjs\" if you want to build all platforms`,\n\t\t);\n\t}\n}\n\nconst stdout = execSync('cargo metadata --format-version=1');\nconst {packages} = JSON.parse(stdout as unknown as string);\n\nconst rustFfmpegSys = packages.find((p) => p.name === 'ffmpeg-sys-next');\n\nif (!rustFfmpegSys) {\n\tconsole.error(\n\t\t'Could not find ffmpeg-sys-next when running cargo metadata --format-version=1',\n\t);\n\tprocess.exit(1);\n}\n\nconst manifest = rustFfmpegSys.manifest_path;","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/compositor/build.ts#L141-L177","documentation":"Thrown during the compositor build when --all is set, the toolchains directory exists, but one of the expected per-target toolchain subdirectories is missing. Each cross-compile target needs its own linker (e.g. aarch64-unknown-linux-gnu-gcc), and the build checks each entry from the toolchains list before proceeding.","triggerScenarios":"Running `--all` after a partial or interrupted install-toolchain run that left some toolchain subdirectories absent, or after one was manually deleted.","commonSituations":"Interrupted toolchain install; selective deletion of a toolchain; mismatch between the toolchains list and what install-toolchain.ts actually downloaded (e.g. after a version bump).","solutions":["Re-run `bun install-toolchain.ts` to restore the missing toolchain subdirectory.","Verify the toolchains directory contains an entry for every target in packages/compositor/toolchains.ts.","If you only need specific targets, prefer --lambda or --cloudrun over --all."],"exampleFix":"// before\nbun packages/compositor/build.ts --all\n# -> Toolchain for aarch64_musl_toolchain not found.\n\n// after\nbun packages/compositor/install-toolchain.ts\nbun packages/compositor/build.ts --all","handlingStrategy":"validation","validationCode":"for (const t of toolchains) {\n  if (process.argv.includes('--all') && !existsSync(path.join('toolchains', t))) {\n    throw new Error(`Missing toolchain: ${t}. Re-run install-toolchain.ts`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-run `bun install-toolchain.ts` if any toolchain subdirectory is missing.","Verify every entry in toolchains.ts is present before an --all build.","Use --lambda/--cloudrun for narrower builds when you don't need all targets."],"tags":["compositor","build","toolchain","ci"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}