EISDIR: illegal operation on a directory when enable Remote Debug in Managed workflow

  1. SDK Version: 41
  2. Platforms(Android/iOS/web/all): Android

When create a new App and enable Remote Debug, the CLI throws that exception:

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:614:3)
    at tryReadSync (fs.js:383:20)
    at Object.readFileSync (fs.js:420:19)
    at UnableToResolveError.buildCodeFrameMessage (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:304:17)
    at new UnableToResolveError (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:290:35)
    at ModuleResolver.resolveDependency (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:168:15)
    at DependencyGraph.resolveDependency (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\node-haste\DependencyGraph.js:353:43)
    at C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\lib\transformHelpers.js:271:42
    at C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\Server.js:1097:37
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\Server.js:99:24)
    at _next (C:\Users\igor.chagas\Desktop\test rg digital\rg-digital\node_modules\metro\src\Server.js:119:9)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)

And the hot reload stops.
Tried update Node, NPM and nothing changed.

Thanks for helping

Hey @igor4505, please run expo diagnostics and share what’s printed out here.


1 Like


1 Like

Hi igor4505-
I am having this problem now. When I run in remote debug I get : EISDIR: illegal operation on a directory, read
Were you able to figure this out?

p.s. my diagnostics:
Expo CLI 4.7.2 environment info:
OS: macOS 10.15.7
Shell: 5.7.1 - /bin/zsh
Node: 14.17.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.13 - /usr/local/bin/npm
Watchman: 2021.06.07.00 - /usr/local/bin/watchman
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android Studio: 4.1 AI-201.8743.12.41.7199119
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
expo: ~41.0.1 => 41.0.1
react: 16.13.1 => 16.13.1
react-dom: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2
react-native-web: ~0.13.12 => 0.13.18
Expo Workflow: managed

1 Like

i have this problem too

Any update here?

The issue started for me after I updated the expo cli

I recently set up my environment, and I am also experiencing this error. Running the app works, but the issue arises whenever I enable Debug remote JS.

By running expo diagnostics, here’s my result:

Hi @akinwalehabib, @shubhangh, @bombillazo, @eiire, @ldwight, @igor4505

I found a post about this here:


This person says that the problem went away when they disabled source maps in Chrome. Could you see if you get errors in Chrome about source maps at the same time as you get the EISDIR error?

If so, as a test, could you try disabling the source maps in chrome? If that gets past the problem then it seems like there might be something wrong with Metro wrt. source maps.

@shubhangh if this happened after an expo-cli upgrade, can you see which version of expo-cli worked for you and which version fails? I see expo-cli versions 4.7.0, 4.7.2 and 4.9.1 mentioned in the expo diagnostics output above.

Hey @wodin, let me quickly give this a try and circle back.

Another thing you might try:

Clear your metro cache with: expo start -c

Let us know how it goes

I diabled the source maps in Google Chrome browser, and the issue persiss:

About to clear the expo cache to see if that works. Another thing is I just set up my environment on Mac, so this is a fresh install. This happened from create_react_native

Hey @shubhangh what cli version were you using before?

Hi all, to investigate this further we would need a reproducible project. If any of you can send me a Github project, which has this issue, I’d be happy to take a look!

You can share the link here, or ping me on our Discord chat (Cedric).