{"record":{"id":"e14241d538c2b037","repo":"paperclipai/paperclip","slug":"entrypoint-name-bundle-emitted-outputs-length","errorCode":null,"errorMessage":"${entrypoint.name} bundle emitted ${outputs.length} entrypoint outputs instead of one","messagePattern":"(.+?) bundle emitted (.+?) entrypoint outputs instead of one","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/scripts/build-verified-provider-entrypoints.mjs","lineNumber":38,"sourceCode":"    output: resolve(packageRoot, \"dist/cli/opencode-app-server-proxy.js\"),\n    verifiedOutput: resolve(\n      packageRoot,\n      \"dist/cli/opencode-app-server-proxy.cjs\",\n    ),\n  }),\n]);\n\nconst nodeBuiltins = new Set([\n  ...builtinModules,\n  ...builtinModules.map((name) => `node:${name}`),\n]);\n\nfunction assertSelfContainedBundle(entrypoint, result) {\n  const outputs = Object.entries(result.metafile.outputs).filter(\n    ([, output]) => output.entryPoint !== undefined,\n  );\n  if (outputs.length !== 1) {\n    throw new Error(\n      `${entrypoint.name} bundle emitted ${outputs.length} entrypoint outputs instead of one`,\n    );\n  }\n  const imports = outputs[0][1].imports;\n  for (const dependency of imports) {\n    if (!dependency.external || !nodeBuiltins.has(dependency.path)) {\n      throw new Error(\n        `${entrypoint.name} bundle retained a non-builtin import: ${dependency.path}`,\n      );\n    }\n  }\n}\n\nexport async function bundleVerifiedProviderEntrypoints({ write = true } = {}) {\n  const results = [];\n  for (const entrypoint of verifiedProviderEntrypoints) {\n    const buildBundle = async (outfile, format) => {\n      const result = await build({","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/scripts/build-verified-provider-entrypoints.mjs#L20-L56","documentation":"Guard in assertSelfContainedBundle in build-verified-provider-entrypoints.mjs: after esbuild, the bundle's metafile lists more than one (or zero) output with an entryPoint for the given entrypoint (e.g. opencode-app-server-proxy). The build expects exactly one self-contained entrypoint output; multiple entry outputs mean the build config split or duplicated the entry, breaking the verified-bundle contract.","triggerScenarios":"Thrown at packages/paperclip-runner/scripts/build-verified-provider-entrypoints.mjs:38 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the esbuild config for the entrypoint and remove extra entry-emitting outputs","Ensure only a single output format (js or cjs) is configured per entrypoint","Re-run the verified-entrypoints build after fixing the bundle configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}