Skip to content

Commit

Permalink
Temporary Metro patch until RN upgrades Metro
Browse files Browse the repository at this point in the history
Issue message: "Error: EISDIR: illegal operation on a directory,
read"
Fix PR on Metro: facebook/metro#567
  • Loading branch information
hypest committed Jun 17, 2021
1 parent 764f2e5 commit 170e4dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/metro+0.64.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js b/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
index 5f32fc5..2b80fda 100644
--- a/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
+++ b/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js
@@ -346,7 +346,7 @@ class UnableToResolveError extends Error {
try {
file = fs.readFileSync(this.originModulePath, "utf8");
} catch (error) {
- if (error.code === "ENOENT") {
+ if (error.code === "ENOENT" || error.code === 'EISDIR') {
// We're probably dealing with a virtualised file system where
// `this.originModulePath` doesn't actually exist on disk.
// We can't show a code frame, but there's no need to let this I/O

0 comments on commit 170e4dc

Please sign in to comment.