We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3debb0c commit f5af8fdCopy full SHA for f5af8fd
packages/host/src/node/path-utils.ts
@@ -342,8 +342,16 @@ export async function findNodeApiModulePaths(
342
);
343
}
344
345
- } catch {
346
- // Intentionally left empty: if the directory cannot be read, we skip it
+ } catch (error) {
+ if (
347
+ error instanceof Error &&
348
+ "code" in error &&
349
+ (error.code === "ENOENT" || error.code === "EACCES")
350
+ ) {
351
+ // Gracefully handling issues with reading directories
352
+ return [];
353
+ }
354
+ throw error;
355
356
const childResults = await Promise.all(pendingResults);
357
result.push(...childResults.flatMap((filePath) => filePath));
0 commit comments