From 988b8d67eabdf1e04ed1c0d4acab5ec8738987d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:11:03 +0200 Subject: [PATCH 1/3] skip error saying events were dropped since watcher still is alive --- tools/fs/safe-watcher.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 3e9bda0ab4..6e0d222d3f 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -301,10 +301,13 @@ async function ensureWatchRoot(dirPath: string): Promise { osDirPath, (err, events) => { if (err) { - console.error(`Parcel watcher error on ${osDirPath}:`, err); + if (/Events were dropped/.test(err.message)) { + return; + } // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) { + console.log('fallbackToPolling'); fallbackToPolling(); } watchRoots.delete(dirPath); From b6a6d7b34c2eaa0b3f25edd5d45951f6d2bb68ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:19:38 +0200 Subject: [PATCH 2/3] clean --- tools/fs/safe-watcher.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 6e0d222d3f..57ce310b22 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -307,7 +307,6 @@ async function ensureWatchRoot(dirPath: string): Promise { // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) { - console.log('fallbackToPolling'); fallbackToPolling(); } watchRoots.delete(dirPath); From 4580cb81a7131f1c613ecc511fab8f48ad171ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Codo=C3=B1er?= Date: Wed, 21 May 2025 17:21:21 +0200 Subject: [PATCH 3/3] clean --- tools/fs/safe-watcher.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fs/safe-watcher.ts b/tools/fs/safe-watcher.ts index 57ce310b22..492bd03028 100644 --- a/tools/fs/safe-watcher.ts +++ b/tools/fs/safe-watcher.ts @@ -304,6 +304,7 @@ async function ensureWatchRoot(dirPath: string): Promise { if (/Events were dropped/.test(err.message)) { return; } + console.error(`Parcel watcher error on ${osDirPath}:`, err); // Only disable native watching for critical errors (like ENOSPC). // @ts-ignore if (err.code === "ENOSPC" || err.errno === require("constants").ENOSPC) {