{"record":{"id":"e619992582cdd3d9","repo":"oven-sh/bun","slug":"failed-to-build-vendor-buildresult-error","errorCode":null,"errorMessage":"Failed to build vendor: ${buildResult.error}","messagePattern":"Failed to build vendor: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/runner.node.mjs","lineNumber":1201,"sourceCode":"\n      const packageJson = join(relative(cwd, vendorPath), \"package.json\").replace(/\\\\/g, \"/\");\n      if (packageManager === \"bun\") {\n        const { ok } = await runTest(packageJson, () => spawnBunInstall(execPath, { cwd: vendorPath }));\n        if (!ok) {\n          continue;\n        }\n      } else {\n        throw new Error(`Unsupported package manager: ${packageManager}`);\n      }\n\n      // build\n      const buildResult = await spawnBun(execPath, {\n        cwd: vendorPath,\n        args: [\"run\", \"build\"],\n        timeout: 60_000,\n      });\n      if (!buildResult.ok) {\n        throw new Error(`Failed to build vendor: ${buildResult.error}`);\n      }\n\n      for (const testPath of testPaths) {\n        const title = join(relative(cwd, vendorPath), testPath).replace(/\\\\/g, \"/\");\n\n        if (testRunner === \"bun\") {\n          await runTest(title, index =>\n            spawnBunTest(execPath, testPath, { cwd: vendorPath, env: { TEST_SERIAL_ID: index } }),\n          );\n        } else {\n          const testRunnerPath = join(cwd, \"test\", \"runners\", `${testRunner}.ts`);\n          if (!existsSync(testRunnerPath)) {\n            throw new Error(`Unsupported test runner: ${testRunner}`);\n          }\n          await runTest(title, () =>\n            spawnBunTest(execPath, testPath, {\n              cwd: vendorPath,\n              args: [\"--preload\", testRunnerPath],","sourceCodeStart":1183,"sourceCodeEnd":1219,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/runner.node.mjs#L1183-L1219","documentation":"Thrown after `bun run build` inside a vendored package exits unsuccessfully. It means the third-party project's own build script failed (incompatible source, missing deps, or broken build), with the spawn error carried in the message.","triggerScenarios":"Thrown at scripts/runner.node.mjs:1201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `bun run build` in the vendor directory manually to see the failure","Check the vendor's build script and pinned tag compatibility"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}