Ran into this error this morning in Grunt. Basically it’s caused because the user is limited by how many files can be watched by one user. You can increase this limit with the following command:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Or if for some reason you don’t want to increase this limit (God knows why) you can use dedupe with npm
npm dedupe
Which simplifies the structure of npm