From a48b89e2c0b60ff5b71e3e3d8df476a19744dcc8 Mon Sep 17 00:00:00 2001 From: Alexis Sanehisa Date: Mon, 30 Oct 2023 10:56:53 -0400 Subject: [PATCH] check file exists --- packages/pages/src/common/src/template/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/pages/src/common/src/template/client.ts b/packages/pages/src/common/src/template/client.ts index ef0a9d489..7852f557c 100644 --- a/packages/pages/src/common/src/template/client.ts +++ b/packages/pages/src/common/src/template/client.ts @@ -88,7 +88,9 @@ export const removeHydrationClientFiles = async ( projectStructure.config.subfolders.templates, template ); - fs.rmSync(clientPath); + if (fs.existsSync(clientPath)) { + fs.rmSync(clientPath); + } }); } };