diff --git a/packages/astro/src/runtime/server/index.ts b/packages/astro/src/runtime/server/index.ts index 6fe61d827..93c908416 100644 --- a/packages/astro/src/runtime/server/index.ts +++ b/packages/astro/src/runtime/server/index.ts @@ -216,6 +216,11 @@ There ${plural ? 'are' : 'is'} ${renderers.length} renderer${plural ? 's' : ''} but ${plural ? 'none were' : 'it was not'} able to server-side render ${metadata.displayName}. Did you mean to enable ${formatList(probableRendererNames.map((r) => '`' + r + '`'))}?`); + } else if (matchingRenderers.length === 1) { + // We already know that renderer.ssr.check() has failed + // but this will throw a much more descriptive error! + renderer = matchingRenderers[0]; + ({ html } = await renderer.ssr.renderToStaticMarkup(Component, props, children)); } else { throw new Error(`Unable to render ${metadata.displayName}!