{"record":{"id":"d1a068928a21bac1","repo":"withastro/astro","slug":"integration-colors-bold-integration-name-has-a","errorCode":null,"errorMessage":"Integration ${colors.bold(integration.name)} has an unnamed renderer.","messagePattern":"Integration (.+?) has an unnamed renderer\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/astro/src/integrations/hooks.ts","lineNumber":229,"sourceCode":"\t\t *   import.meta.env.production ? compress() : null\n\t\t * ]\n\t\t * ```\n\t\t */\n\n\t\tlet isLoggerUpdated = false;\n\n\t\tconst { integrationLogger } = await runHookInternal({\n\t\t\tintegration,\n\t\t\thookName: 'astro:config:setup',\n\t\t\tlogger,\n\t\t\tparams: () => {\n\t\t\t\tconst hooks: Omit<HookParameters<'astro:config:setup'>, 'logger'> = {\n\t\t\t\t\tconfig: updatedConfig,\n\t\t\t\t\tcommand,\n\t\t\t\t\tisRestart,\n\t\t\t\t\taddRenderer(renderer: AstroRenderer) {\n\t\t\t\t\t\tif (!renderer.name) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t`Integration ${colors.bold(integration.name)} has an unnamed renderer.`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!renderer.serverEntrypoint) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t`Renderer ${colors.bold(renderer.name)} does not provide a serverEntrypoint.`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (renderer.name === 'astro:jsx') {\n\t\t\t\t\t\t\tastroJSXRenderer = renderer;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tupdatedSettings.renderers.push(renderer);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tinjectScript: (stage, content) => {\n\t\t\t\t\t\tupdatedSettings.scripts.push({ stage, content });","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/integrations/hooks.ts#L211-L247","documentation":"During `astro:config:setup`, an integration can register renderers with `addRenderer(renderer)`. Astro requires every renderer to have a `name` (used for logging, error messages, and renderer resolution) and throws this plain Error from the addRenderer callback when `renderer.name` is falsy.","triggerScenarios":"An integration calling addRenderer({ serverEntrypoint, ... }) without a name property; a renderer object built conditionally where name can be undefined; refactoring a renderer integration and dropping the name field.","commonSituations":"Authoring a framework-renderer integration; copying a partial renderer config from docs or another integration; type assertions hiding a missing required field.","solutions":["Give the renderer a stable name: addRenderer({ name: '@myorg/solid', serverEntrypoint, ... }).","Type the argument as AstroRenderer so TypeScript flags missing fields before runtime.","If this fires from a dependency, report it to the integration - the fix belongs in its addRenderer call."],"exampleFix":"// before\naddRenderer({ serverEntrypoint: '@myorg/solid/server.js', clientEntrypoint: '@myorg/solid/client.js' });\n\n// after\naddRenderer({\n  name: '@myorg/solid',\n  serverEntrypoint: '@myorg/solid/server.js',\n  clientEntrypoint: '@myorg/solid/client.js',\n});","handlingStrategy":"validation","validationCode":"// before calling addRenderer in your integration\nif (!renderer.name || typeof renderer.name !== 'string') {\n  throw new Error('renderer.name is required');\n}\naddRenderer(renderer);","typeGuard":"import type { AstroRenderer } from 'astro';\nfunction isCompleteRenderer(r: Partial<AstroRenderer>): r is AstroRenderer {\n  return typeof r.name === 'string' && !!r.serverEntrypoint;\n}","tryCatchPattern":null,"preventionTips":["Type renderer objects as AstroRenderer so missing required fields fail at compile time.","Keep a checklist integration test that registers the renderer against a minimal settings object.","Prefer vendor-prefixed renderer names to avoid ambiguity in logs and errors."],"tags":["integrations","renderers","plugin-api"],"backgroundTag":"invalid-integration-contract","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}