From 34e979d7d9f637018d434eae249b72c3dd4c0344 Mon Sep 17 00:00:00 2001 From: simeng-li <36393111+simeng-li@users.noreply.github.com> Date: Tue, 28 Sep 2021 10:02:30 +0800 Subject: [PATCH] fix(schema): update db-entries generation job (#120) On Node 16.x.x fs.rmdir throw err if dir does not exist Also from Node 16.x.x fs.rmdir will be deprecated, use fs.rm instead --- packages/schemas/src/gen/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/schemas/src/gen/index.ts b/packages/schemas/src/gen/index.ts index e9b61da9b..837362c15 100644 --- a/packages/schemas/src/gen/index.ts +++ b/packages/schemas/src/gen/index.ts @@ -101,7 +101,7 @@ const generate = async () => { const tsTypesFilename = '../foundations'; const header = '// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n\n'; - await fs.rmdir(generatedDirectory, { recursive: true }); + await fs.rm(generatedDirectory, { recursive: true, force: true }); await fs.mkdir(generatedDirectory, { recursive: true }); // Postgres custom types