
ReactNative Expoの「EMFILE: too many open files, watch at ...」エラーの回避方法

geDem
エラー「Error: EMFILE: too many open files, watch at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)」
ReactNative Expo でプロジェクトを立ち上げて、
npx create-expo-app
エミュレーターを立ち上げようと思い、以下ののコマンドを打ったところ、、、
npm run start
このようなエラーに遭遇しました。
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
「ファイル開きすぎてるのかな?(そんなエラーあるか?)」と思い、一旦ファイルをすべて閉じて、エディタを再起動しても治らず...
解決策
依存関係を解決することで直りました。
コマンド:
npm install
結果:
added 1 package, and audited 1551 packages in 1s
146 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
なにが追加されたんだろう...
参考
https://stackoverflow.com/questions/72775262/how-to-fix-too-many-open-files-error-in-react-native
🙂↕️最後まで読んでいただきありがとうございます🙂↕️