{"record":{"id":"c095fef3a89c332e","repo":"oven-sh/bun","slug":"vendor-name-does-not-have-a-package-json-p","errorCode":null,"errorMessage":"Vendor '${name}' does not have a package.json: ${packageJsonPath}","messagePattern":"Vendor '(.+?)' does not have a package\\.json: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"scripts/runner.node.mjs","lineNumber":2427,"sourceCode":"        let { ok, error } = await spawnSafe({\n          command: \"git\",\n          args: [\"fetch\", \"--depth\", \"1\", \"origin\", \"tag\", tag],\n          timeout: testTimeout,\n          cwd: vendorPath,\n        });\n        if (!ok) throw new Error(`failed to fetch tag ${tag} for vendor '${name}': ${error}`);\n\n        ({ ok, error } = await spawnSafe({\n          command: \"git\",\n          args: [\"checkout\", tag],\n          timeout: testTimeout,\n          cwd: vendorPath,\n        }));\n        if (!ok) throw new Error(`failed to checkout tag ${tag} for vendor '${name}': ${error}`);\n\n        const packageJsonPath = join(vendorPath, \"package.json\");\n        if (!existsSync(packageJsonPath)) {\n          throw new Error(`Vendor '${name}' does not have a package.json: ${packageJsonPath}`);\n        }\n\n        const testPathPrefix = testPath || \"test\";\n        const testParentPath = join(vendorPath, testPathPrefix);\n        if (!existsSync(testParentPath)) {\n          throw new Error(`Vendor '${name}' does not have a test directory: ${testParentPath}`);\n        }\n\n        const isTest = path => {\n          if (!isJavaScriptTest(path)) {\n            return false;\n          }\n\n          if (typeof skipTests === \"boolean\") {\n            return !skipTests;\n          }\n\n          if (typeof skipTests === \"object\") {","sourceCodeStart":2409,"sourceCodeEnd":2445,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/scripts/runner.node.mjs#L2409-L2445","documentation":"Guard after clone/checkout: the vendored repository has no package.json at its root, so dependencies cannot be installed and tests cannot be run. Either the repo layout changed or the vendor entry points at the wrong project.","triggerScenarios":"Thrown at scripts/runner.node.mjs:2427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the vendor entry at a repository/tag that ships a root package.json","Skip the vendor if its tests no longer apply"],"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"}