From 733669c3aa26413c7b074472a597d23b3228d40f Mon Sep 17 00:00:00 2001 From: horo <143025439+horo-fox@users.noreply.github.com> Date: Sun, 7 Apr 2024 08:13:35 +0900 Subject: [PATCH 1/4] Log when a page fails --- packages/astro/src/core/build/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 7dc00073fc5b..5277bf17f912 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -335,7 +335,7 @@ async function getPathsForRoute( logger, ssr: serverLike, }).catch((err) => { - logger.debug('build', `├── ${bold(red('✗'))} ${route.component}`); + logger.info(null, `├── ${bold(red('✗'))} ${route.component}`); throw err; }); From d541442e58ac720fe5abebaf5ce6808e8a72dd72 Mon Sep 17 00:00:00 2001 From: horo <143025439+horo-fox@users.noreply.github.com> Date: Tue, 9 Apr 2024 01:33:07 +0900 Subject: [PATCH 2/4] PR review Co-authored-by: Bjorn Lu --- packages/astro/src/core/build/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 5277bf17f912..10e3880741c6 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -335,7 +335,7 @@ async function getPathsForRoute( logger, ssr: serverLike, }).catch((err) => { - logger.info(null, `├── ${bold(red('✗'))} ${route.component}`); + logger.error('build, `Failed to call getStaticPaths for ${route.component}`); throw err; }); From 024ae514f1f61f187e0911d5616883819a776481 Mon Sep 17 00:00:00 2001 From: horo <143025439+horo-fox@users.noreply.github.com> Date: Tue, 9 Apr 2024 01:39:16 +0900 Subject: [PATCH 3/4] Fix typo --- packages/astro/src/core/build/generate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 10e3880741c6..d82ecdbd8daa 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -335,7 +335,7 @@ async function getPathsForRoute( logger, ssr: serverLike, }).catch((err) => { - logger.error('build, `Failed to call getStaticPaths for ${route.component}`); + logger.error('build', `Failed to call getStaticPaths for ${route.component}`); throw err; }); From d3168b497001330ef8eb8dd25fbceb1b61346c50 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 9 Apr 2024 11:09:00 +0800 Subject: [PATCH 4/4] Create slimy-geese-own.md --- .changeset/slimy-geese-own.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/slimy-geese-own.md diff --git a/.changeset/slimy-geese-own.md b/.changeset/slimy-geese-own.md new file mode 100644 index 000000000000..6fca5282ba13 --- /dev/null +++ b/.changeset/slimy-geese-own.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Logs an error when a page's `getStaticPaths` fails