当前位置:首页 > 开发 > 软件应用 > 正文

Gulp watch error Error: watch /home/react-mobile/stylus/ ENOSPC

发表于: 2016-04-25   作者:qiaolevip   来源:转载   浏览:
摘要: 'watch'erroredafter19ms [13:25:21]Error:watch/home/react-mobile/stylus/ENOSPC atexports._errnoException(util.js:870:11) atFSWatcher.start(fs.js:1234:19) atObject.fs.watch(fs.js:1262:11) atGaze._w
 'watch' errored after 19 ms
[13:25:21] Error: watch /home/react-mobile/stylus/ 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/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:289:30)
    at /home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:358:10
    at iterate (/home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:52:5)
    at Object.forEachSeries (/home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/helper.js:66:3)
    at Gaze._initWatched (/home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:354:10)
    at Gaze.add (/home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:177:8)
    at new Gaze (/home/react-mobile/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:74:10)

 

报错原因是由于Linux watch文件大小限制

 

解决方案:修改watch限制

 

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

 

 

Gulp watch error Error: watch /home/react-mobile/stylus/ ENOSPC

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号