{"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":"Error \"Failed to build vendor: ${buildResult.error}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at scripts/runner.node.mjs:1201 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}