Closed pranshuchittora closed 3 years ago
Hi, can you try if this also happens without the typescript template?
I can confirm that I'm facing the same error. I created a new react native project using the template react-native-template-typescript
and get this error Error: EISDIR: illegal operation on a directory, read
after bundling the app.
So far I haven't been able to figure out which directory/file it is trying to read.
Edit: I believe that the error looks weird due to https://github.com/facebook/metro/pull/567.
Edit 2: after fixing metro/src/node-haste/DependencyGraph/ModuleResolution.js
(see https://github.com/facebook/metro/pull/567/files) I'm getting this error:
Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4 from C:\Users\Samuel\Development\CourseApp2/.: ./debugger-ui/debuggerWorker.aca173c4 could not be found within the project or in these directories:
node_modules
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
at ModuleResolver.resolveDependency (C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:234:15)
at DependencyGraph.resolveDependency (C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\node-haste\DependencyGraph.js:413:43)
at C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\lib\transformHelpers.js:317:42
at C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\Server.js:1471:14
at Generator.next (<anonymous>)
at asyncGeneratorStep (C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\Server.js:146:24)
at _next (C:\Users\Samuel\Development\CourseApp2\node_modules\metro\src\Server.js:168:9)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Now I'm not sure if that's related to the typescript template, or even if that's the same issue @pranshuchittora is facing...
@dgellow can you try to create a project without the template and if you can reproduce it?
Hey @radko93. I did this a few minutes ago, and yes I can reproduce without the typescript template. There are two things:
So it doesn't seem to be related to the typescript template. I believe that we can close this issue, but I'm not the one who created it, and do not know if @pranshuchittora is actually facing the same issue. The symptom look the same because of the bug in metro, but that's it. Once you apply the patch to fix metro you get the actual error message ("Error: unable to resolve module
Closing this as this seems to be not related to this template and an issue in the RN repo should be created instead.
Observed results
App crashing of hitting debug
Logs
Please add the log output here.
Steps to reproduce