summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Dan Jutan <danjutan@gmail.com> 2022-10-26 14:35:34 -0400
committerGravatar GitHub <noreply@github.com> 2022-10-26 14:35:34 -0400
commit81310b1dde5517af9dee170a938053022465d207 (patch)
tree3497532c217a55ef206a99fb709e2f60809ce210
parent707cac9fdfe3fdbd3714deb02f5452e5758c6575 (diff)
downloadastro-81310b1dde5517af9dee170a938053022465d207.tar.gz
astro-81310b1dde5517af9dee170a938053022465d207.tar.zst
astro-81310b1dde5517af9dee170a938053022465d207.zip
Error message: clarify "adapter does not have previewEntrypoint" (#5182)
* clarify preview error message * Update packages/astro/src/core/preview/index.ts Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
-rw-r--r--packages/astro/src/core/preview/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/astro/src/core/preview/index.ts b/packages/astro/src/core/preview/index.ts
index 276e2d067..fb09bb630 100644
--- a/packages/astro/src/core/preview/index.ts
+++ b/packages/astro/src/core/preview/index.ts
@@ -33,7 +33,7 @@ export default async function preview(
throw new Error(`[preview] No adapter found.`);
}
if (!settings.adapter.previewEntrypoint) {
- throw new Error(`[preview] adapter does not have previewEntrypoint.`);
+ throw new Error(`[preview] The ${settings.adapter.name} adapter does not support the preview command.`);
}
// We need to use require.resolve() here so that advanced package managers like pnpm
// don't treat this as a dependency of Astro itself. This correctly resolves the