Repository: withastro/astro
File: packages/astro/src/core/errors/errors-data.ts (TypeScript)

Code before:
	message: `Cannot use server-rendered pages without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
	hint: 'See https://docs.astro.build/en/guides/on-demand-rendering/ for more information.',
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
 * @description
 * The currently configured adapter does not support server-side rendering, which is required for the current project setup.
 *
 * Depending on your adapter, there may be a different entrypoint to use for server-side rendering. For example, the `@astrojs/vercel` adapter has a `@astrojs/vercel/static` entrypoint for static rendering, and a `@astrojs/vercel/serverless` entrypoint for server-side rendering.
 *
 */
export const AdapterSupportOutputMismatch = {
	name: 'AdapterSupportOutputMismatch',
	title: 'Adapter does not support server output.',
	message: (adapterName: string) =>
		`The \`${adapterName}\` adapter is configured to output a static website, but the project contains server-rendered pages. Please install and configure the appropriate server adapter for your final deployment.`,
} satisfies ErrorData;

/**
 * @docs
 * @description
 *
 * The adapter tried to enable hosted CSP headers, but the project is not using the CSP feature.
 */
export const AdapterExperimentalCspDisabled = {
	name: 'AdapterExperimentalCspDisabled',
	title:
		'The adapter tried to enable hosted CSP headers, but the project is not using the CSP feature.',
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [On-demand Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
 * @description
 * To use server islands, the same constraints exist as for sever-side rendering, so an adapter is needed.
 */
export const NoAdapterInstalledServerIslands = {
	name: 'NoAdapterInstalledServerIslands',
	title: 'Cannot use Server Islands without an adapter.',
	message: `Cannot use server islands without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
	hint: 'See https://docs.astro.build/en/guides/on-demand-rendering/ for more information.',
} satisfies ErrorData;
/**
 * @docs
 * @description
 * No import statement was found for one of the components. If there is an import statement, make sure you are using the same identifier in both the imports and the component usage.
 */

Review comment (suggestion):
I think we could use another sentence here guiding the user re: what to DO in this situation? If they haven't configured experimental CSP, then why might the adapter be trying to use it and how can they stop the adapter from doing this? 

(There's no other place than config that the user could be adding CSP content, so the user is not trying to use this feature at all, right? If I got this error, I wouldn't know what action to take here, because my adapter is trying to use a feature I never even tried to use.)

Code after:
	message: `Cannot use server-rendered pages without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
	hint: 'See https://docs.astro.build/en/guides/on-demand-rendering/ for more information.',
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [Server-side Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
 * @description
 * The currently configured adapter does not support server-side rendering, which is required for the current project setup.
 *
 * Depending on your adapter, there may be a different entrypoint to use for server-side rendering. For example, the `@astrojs/vercel` adapter has a `@astrojs/vercel/static` entrypoint for static rendering, and a `@astrojs/vercel/serverless` entrypoint for server-side rendering.
 *
 */
export const AdapterSupportOutputMismatch = {
	name: 'AdapterSupportOutputMismatch',
	title: 'Adapter does not support server output.',
	message: (adapterName: string) =>
		`The \`${adapterName}\` adapter is configured to output a static website, but the project contains server-rendered pages. Please install and configure the appropriate server adapter for your final deployment.`,
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [On-demand Rendering](https://docs.astro.build/en/guides/on-demand-rendering/)
 * @description
 * To use server islands, the same constraints exist as for sever-side rendering, so an adapter is needed.
 */
export const NoAdapterInstalledServerIslands = {
	name: 'NoAdapterInstalledServerIslands',
	title: 'Cannot use Server Islands without an adapter.',
	message: `Cannot use server islands without an adapter. Please install and configure the appropriate server adapter for your final deployment.`,
	hint: 'See https://docs.astro.build/en/guides/on-demand-rendering/ for more information.',
} satisfies ErrorData;
/**
 * @docs
 * @description
 * No import statement was found for one of the components. If there is an import statement, make sure you are using the same identifier in both the imports and the component usage.
 */
export const NoMatchingImport = {
	name: 'NoMatchingImport',
	title: 'No import found for component.',
	message: (componentName: string) =>
		`Could not render \`${componentName}\`. No matching import has been found for \`${componentName}\`.`,
	hint: 'Please make sure the component is properly imported.',
} satisfies ErrorData;
/**
 * @docs
 * @message
 * **Example error messages:**<br/>
 * InvalidPrerenderExport: A `prerender` export has been detected, but its value cannot be statically analyzed.