React Native

[React Native] Error: EMFILE: too many open files, watch

mSubWay 2024. 11. 27. 10:49
node:events:485

      throw er; // Unhandled 'error' event

      ^



Error: EMFILE: too many open files, watch

    at FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)

Emitted 'error' event on NodeWatcher instance at:

    at FSWatcher._checkedEmitError (/Users/2ap2024-005/ekcafe/node_modules/metro-file-map/src/watchers/NodeWatcher.js:82:12)

    at FSWatcher.emit (node:events:507:28)

    at FSWatcher._handle.onchange (node:internal/fs/watchers:213:12) {

  errno: -24,

  syscall: 'watch',

  code: 'EMFILE',

  filename: null

}



Node.js v23.1.0

Process terminated. Press <enter> to close the window

 

 

이 에러 나오면

brew update

brew install watchman 

하라고 하던데 나는 잘 안됐다

 

그냥 프로젝트에 있는 node_module 을 지우고 다시 npm install 하여 node_module 을 다시 설치했더니 

메트로 오류 없어지고 빌드도 잘 되었다.