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

Hi- I am able to consistently recreate this - please see my reply to Wodin below.

Hmmm…

Could you put some console.log() statements around the lines it’s complaining about to find out the name of the directory it’s complaining about?

@ldwight, @bycedric I can reproduce the error.

If I patch metro’s ModuleResolution.js to log this.originModulePath and then return null I get the following:

Logs for your project will appear below. Press Ctrl+C to exit.
*** EISDIR /Users/michael/work/personal/scratch/debugger-eisdir/.
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from /Users/michael/work/personal/scratch/debugger-eisdir/.:

None of these files exist:
  * debugger-ui/debuggerWorker.aca173c4.js(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json)
  * debugger-ui/debuggerWorker.aca173c4.js/index(.native|.native.ts|.ts|.native.tsx|.tsx|.native.js|.js|.native.jsx|.jsx|.native.json|.json)
    at ModuleResolver.resolveDependency (/Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
    at DependencyGraph.resolveDependency (/Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
    at /Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/lib/transformHelpers.js:271:42
    at Server.<anonymous> (/Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/Server.js:842:41)
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/Server.js:99:24)
    at _next (/Users/michael/work/personal/scratch/debugger-eisdir/node_modules/metro/src/Server.js:119:9)

So for some reason it’s trying to read “.”

I applied a patch on metro package using patch-package but I get this error https://github.com/facebook/react-native/issues/28844 instead.
Try another emulator but stilll having this error.

please refer to the issue you referenced for information on how to solve this. it is an upstream bug with react-native itself

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.