前端问题:Watchpack Error:too many open files

近日在前端上偶遇Watchpack Error:too many open files这一奇葩问题,经过一番检索,先将修复过程记录.

核心问题:

  Watchpack Error (watcher): Error: EMFILE: too many open files, watch '/home/bizuser/work/net-work/abp02/angular/node_modules/@babel/runtime/helpers'

  Watchpack Error (watcher): Error: ENOSPC: System limit for number of file watchers reached,

解决方法:

  cat /proc/sys/fs/inotify/max_user_watches

  默认8192

  执行:

    sudo sysctl -w fs.inotify.max_user_watches="104857600"

  或者:

    sudo vi /etc/sysctl.conf # 在最后面加入 fs.inotify.max_user_watches=524288 # 保存后推出 # 之后运行命令 sudo sysctl -p

 

posted @ 2024-03-23 23:00  李文学  阅读(159)  评论(0编辑  收藏  举报