Grunt.js issue : Fatal error: spawn EMFILE

Im still workin on grunt.js task runner. And in the last project I had a problem after which I had to restart my grunt server.

Fatal error: spawn EMFILE

That was a problem which occures in my terminal.

How to fix it?

Write it in your console:

ulimit -n 1000

Your problem should be fixed. If the count 1000 is too big for your OS try lower value.