ignite
ignite copied to clipboard
Error: EISDIR: illegal operation on a directory, read at Object.readSync
Fresh Expo install of Ignite, when I run the app in Expo on my Android phone, I see the error below. This was happening on Node V14, I upgraded to the latest Node v15 (as the metro server seemed to keep crashing too), this has solved the crashing but I'm still getting the debug error.
Finished building JavaScript bundle in 1293ms.
Running application on ONEPLUS A6003.
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (node:fs:617:3)
at tryReadSync (node:fs:382:20)
at Object.readFileSync (node:fs:419:19)
at UnableToResolveError.buildCodeFrameMessage (/Users/user/Sites/sitename/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:304:17)
at new UnableToResolveError (/Users/user/Sites/sitename/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (/Users/user/Sites/sitename/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (/Users/user/Sites/sitename/node_modules/metro/src/node-haste/DependencyGraph.js:353:43)
at /Users/user/Sites/sitename/node_modules/metro/src/lib/transformHelpers.js:271:42
at /Users/user/Sites/sitename/node_modules/metro/src/Server.js:1097:37
at Generator.next (<anonymous>)
Here's Ignite Doctor:
System
platform darwin
arch arm64
cpu 8 cores Apple M1
directory name ~/Sites/name
JavaScript (and globally-installed packages)
node 15.9.0 ~/.nvm/versions/node/v15.9.0/bin/node
npm 7.6.1 ~/.nvm/versions/node/v15.9.0/bin/npm
npm 7.6.1
yarn 1.22.10
yarn 1.22.10 ~/.nvm/versions/node/v15.9.0/bin/yarn
Ignite
ignite-cli 6.2.0 ~/.npm-packages/bin/ignite
ignite src build ~/.npm-packages/lib/node_modules/ignite-cli/build
Android
java 1.8.0_282 /usr/bin/java
android home - undefined
iOS
xcode 12.4
cocoapods 1.10.1 /usr/local/bin/pod
I have the same problem:
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:498:3)
at tryReadSync (fs.js:332:20)
at Object.readFileSync (fs.js:369:19)
at UnableToResolveError.buildCodeFrameMessage (F:\Projects\proj\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:304:17)
at new UnableToResolveError (F:\Projects\proj\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:290:35)
at ModuleResolver.resolveDependency (F:\Projects\proj\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:168:15)
at DependencyGraph.resolveDependency (F:\Projects\proj\node_modules\metro\src\node-haste\DependencyGraph.js:353:43)
at F:\Projects\proj\node_modules\metro\src\lib\transformHelpers.js:271:42
at Server.<anonymous> (F:\Projects\proj\node_modules\metro\src\Server.js:842:41)
at Generator.next (<anonymous>)
npm 7.6.1 tried with node 10, 12, 13,15
in my case (not fresh install) removing "react-native-reanimated" library helped
Still happening for me on the latest CLI (6.4) using expo in the IOS simulator; react-native-reanimated isn't a dependancy so no help there.
Are all of you folks on Apple M1 architecture? @jascination @hssdiv
@jamonholmgren Yep, I'm on the M1
not on M1, but i think "Error: EISDIR" might be connected to mobx-state-tree, for example i encountered it again when i wrote types.boolean instead of types.maybeNull(types.boolean) and it couldn't assign undefined to boolean. Also got it when i accidentally created store model with the same name of existing one
Sometimes i have the same issue . Someone told on github that is known metro issue , what helps me to do is the next :
watchman watch-del-all; rm -rf ./ios/build; rm -rf ./ios/Pods; rm -rf $TMPDIR/react-*;rm -rf $TMPDIR/haste-*; rm -rf $TMPDIR/metro-*; rm -rf node_modules/; npm cache verify; yarn; npm start --reset-cache
There has been a lot of changes since this issue last had activity. This is going to be closed for now, but please re-open if this still needs attention.