diff --git a/src/analyze.ts b/src/analyze.ts index 943d58e280..9a1f51f624 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -425,7 +425,7 @@ export async function runFinalize( // After switching to Node16, this entire block can be replaced with `await fs.promises.rm(outputDir, { recursive: true, force: true });`. try { - await fs.promises.rmdir(outputDir, { recursive: true }); + await fs.promises.rmdir(outputDir, { recursive: true, maxRetries: 5, retryDelay: 2000 }); } catch (error: any) { if (error?.code !== "ENOENT") { throw error;