简体   繁体   中英

Gulp gives this error “events.js: 141 throw er; // Unhandled 'error' event”

When I run the command gulp, I get the following error. I am using Elementary Loki and Node 4.2.6. All the other commands are wroking fine:

  • npm install
  • bower install
  • gulp build
anshul@anshul-HP-Notebook:~/Downloads/fivevolts$ gulp
[16:05:40] Using gulpfile ~/Downloads/fivevolts/gulpfile.js
[16:05:40] Starting 'usemin'...
[16:05:40] Starting 'copy-bower_fonts'...
[16:05:40] Starting 'custom-images'...
[16:05:40] Starting 'custom-js'...
[16:05:40] Starting 'custom-less'...
[16:05:40] Starting 'custom-templates'...
[16:05:40] Starting 'webserver'...
[16:05:41] Finished 'webserver' after 139 ms
[16:05:41] Starting 'livereload'...
[16:05:41] Finished 'livereload' after 12 ms
[16:05:41] Starting 'watch'...
[16:05:41] 'watch' errored after 10 ms
[16:05:41] Error: watch /home/anshul/Downloads/fivevolts/src/img/ ENOSPC
    at exports._errnoException (util.js:870:11)
    at FSWatcher.start (fs.js:1234:19)
    at Object.fs.watch (fs.js:1262:11)
    at Gaze._watchDir (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/gaze.js:289:30)
    at /home/anshul/Downloads/fivevolts/node_modules/gaze/lib/gaze.js:358:10
    at iterate (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/gaze.js:354:10)
    at Gaze.add (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/gaze.js:177:8)
    at new Gaze (/home/anshul/Downloads/fivevolts/node_modules/gaze/lib/gaze.js:74:10)
[16:05:41] Server started http://localhost:8888
[16:05:41] LiveReload started on port 35729
[16:05:41] Finished 'custom-less' after 201 ms
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: watch /home/anshul/Downloads/fivevolts/dist ENOSPC
    at exports._errnoException (util.js:870:11)
    at FSWatcher.start (fs.js:1234:19)
    at Object.fs.watch (fs.js:1262:11)
    at createFsWatchInstance (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:37:15)
    at setFsWatchListener (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:80:15)
    at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:228:14)
    at FSWatcher.NodeFsHandler._handleDir (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:407:19)
    at FSWatcher.<anonymous> (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:455:19)
    at FSWatcher.<anonymous> (/home/anshul/Downloads/fivevolts/node_modules/chokidar/lib/nodefs-handler.js:460:16)
    at FSReqWrap.oncomplete (fs.js:82:15)

I don't think the error is in the code, as I tried to run gulp on some other project codes that were working fine earlier, are now getting the same error.

This happens when multiple applications trying to access the same port, Its always FIFO. Check your gulp toolkit port and try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM