Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: ENFILE: file table overflow, scandir while run reaction on Mac

I'm trying to install and run Reaction on mac osx 10.12.15 within below command

npm install -g reaction-cli reaction init cd reaction reaction

Then I got below error I'm just fresh with Reactjs developer so it is simply nervously. And it simply compatible with the package version but how can i solve this problem

=> Started proxy.
=> Started MongoDB.
/Users/sopheak/.meteor/packages/templating-compiler/.1.3.2.1411czp++os+web.browser+web.cordova/plugin.compileTemplatesBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
      throw error;
      ^
Error: ENFILE: file table overflow, scandir '/Users/sopheak/Documents/cam/react/reaction/packages/gridfs'
    at Error (native)
    at Object.fs.readdirSync (fs.js:808:18)
    at Object.wrapper (/tools/fs/files.js:1586:35)
    at readDirectory (/Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fs/watch.js:338:26)
    at Watcher._fireIfDirectoryChanged (/Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fs/watch.js:490:23)
    at /Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fs/watch.js:747:12
    at Array.forEach (native)
    at Function._.each._.forEach (/Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
    at Watcher._checkDirectories (/Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fs/watch.js:736:7)
    at new Watcher (/Users/sopheak/.meteor/packages/meteor-tool/.1.5.0.15auley++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fs/watch.js:435:10)
    at setupClientWatcher (/tools/runners/run-app.js:800:23)
    at [object Object]._.extend._runOnce (/tools/runners/run-app.js:811:7)
    at [object Object]._.extend._fiber (/tools/runners/run-app.js:890:28)
    at /tools/runners/run-app.js:417:12
like image 706
DMS-KH Avatar asked Jul 10 '17 05:07

DMS-KH


1 Answers

This is might be due to the limit on file open files on mac. By default it is set to low. You will need to increase the default size.

$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf
$ sudo sysctl -w kern.maxfiles=65536
$ sudo sysctl -w kern.maxfilesperproc=65536
$ ulimit -n 65536 

Refer this link for more details.

like image 93
Prabodh M Avatar answered Oct 20 '22 15:10

Prabodh M