{"action":"created","issue":{"url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/13","repository_url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript","labels_url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/13/comments","events_url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/13/events","html_url":"https://github.com/DanWahlin/AngularIn20TypeScript/issues/13","id":152045717,"number":13,"title":"gulp serve: throw er; // Unhandled 'error' event","user":{"login":"pablorsk","id":938894,"avatar_url":"https://avatars.githubusercontent.com/u/938894?v=3","gravatar_id":"","url":"https://api.github.com/users/pablorsk","html_url":"https://github.com/pablorsk","followers_url":"https://api.github.com/users/pablorsk/followers","following_url":"https://api.github.com/users/pablorsk/following{/other_user}","gists_url":"https://api.github.com/users/pablorsk/gists{/gist_id}","starred_url":"https://api.github.com/users/pablorsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablorsk/subscriptions","organizations_url":"https://api.github.com/users/pablorsk/orgs","repos_url":"https://api.github.com/users/pablorsk/repos","events_url":"https://api.github.com/users/pablorsk/events{/privacy}","received_events_url":"https://api.github.com/users/pablorsk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-30T18:42:16Z","updated_at":"2016-05-01T03:07:05Z","closed_at":"2016-05-01T03:07:05Z","body":"Having problems with `gulp serve`. The browser is open, but fail the watcher. This is the logs:\r\n\r\n```\r\n$ gulp serve\r\n[15:38:07] Using gulpfile ~/AngularIn20TypeScript/gulpfile.js\r\n[15:38:07] Starting 'compile-ts'...\r\n[15:38:07] Starting 'watch'...\r\n[15:38:07] Finished 'watch' after 12 ms\r\n[15:38:08] Finished 'compile-ts' after 1.17 s\r\n[15:38:08] Starting 'serve'...\r\nStarting browserSync and superstatic...\r\n[15:38:08] Finished 'serve' after 37 ms\r\nevents.js:141\r\n      throw er; // Unhandled 'error' event\r\n      ^\r\n\r\nError: watch node_modules/weinre/web/client ENOSPC\r\n    at exports._errnoException (util.js:870:11)\r\n    at FSWatcher.start (fs.js:1234:19)\r\n    at Object.fs.watch (fs.js:1262:11)\r\n    at createFsWatchInstance (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:37:15)\r\n    at setFsWatchListener (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:80:15)\r\n    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:228:14)\r\n    at FSWatcher.NodeFsHandler._handleDir (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:407:19)\r\n    at FSWatcher.<anonymous> (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:455:19)\r\n    at FSWatcher.<anonymous> (/home/pablorsk/AngularIn20TypeScript/node_modules/chokidar/lib/nodefs-handler.js:460:16)\r\n    at FSReqWrap.oncomplete (fs.js:82:15)\r\n```\r\nThe line with `Error: watch` change randomly when I run `gulp serve`. Return lines like:\r\n* `Error: watch node_modules/lodash/fp/thru.js ENOSPC`\r\n* `Error: watch node_modules/weinre/web/target ENOSPC`\r\n* `Error: watch node_modules/weinre/web/doc ENOSPC`"},"comment":{"url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/comments/216011732","html_url":"https://github.com/DanWahlin/AngularIn20TypeScript/issues/13#issuecomment-216011732","issue_url":"https://api.github.com/repos/DanWahlin/AngularIn20TypeScript/issues/13","id":216011732,"user":{"login":"pablorsk","id":938894,"avatar_url":"https://avatars.githubusercontent.com/u/938894?v=3","gravatar_id":"","url":"https://api.github.com/users/pablorsk","html_url":"https://github.com/pablorsk","followers_url":"https://api.github.com/users/pablorsk/followers","following_url":"https://api.github.com/users/pablorsk/following{/other_user}","gists_url":"https://api.github.com/users/pablorsk/gists{/gist_id}","starred_url":"https://api.github.com/users/pablorsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pablorsk/subscriptions","organizations_url":"https://api.github.com/users/pablorsk/orgs","repos_url":"https://api.github.com/users/pablorsk/repos","events_url":"https://api.github.com/users/pablorsk/events{/privacy}","received_events_url":"https://api.github.com/users/pablorsk/received_events","type":"User","site_admin":false},"created_at":"2016-05-01T03:07:05Z","updated_at":"2016-05-01T03:07:05Z","body":"The problem was kernel parameters -_-. This is the solution:\r\n\r\n```bash\r\necho fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p\r\n```"}}