Fatal error_ ENOSPC_ System limit for number of file watchers reached, watch '...path...'

简介: Fatal error_ ENOSPC_ System limit for number of file watchers reached, watch '...path...'

某前端工程在 Ubuntu18.04 系统环境中运行 npm run dev 命令时出现如下错误

...
Running "browserSync:bsFiles" (browserSync) task
[Browsersync] Access URLs:
 ----------------------------------------
       Local: http://localhost:3000
    External: http://192.168.199.172:3000
 ----------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.199.172:3001
 ----------------------------------------
[Browsersync] Serving files from: ./
[Browsersync] Watching files...
Fatal error: ENOSPC: System limit for number of file watchers reached, watch '/home/w/my/project/...'
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! Exit status 3
npm ERR! 
...

解决方案

在终端按顺序执行下面两个命令即可解决问题 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

sudo sysctl --system

目录
相关文章
|
JSON 边缘计算 数据格式
KubeEdge安装加入边缘节点报错: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number into
KubeEdge安装加入边缘节点报错: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number into
361 0
|
4月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
42 0
|
关系型数据库 MySQL
Mysql报错:InnoDB: Operating system error number 13 in a fil..的解决方法
Mysql报错:InnoDB: Operating system error number 13 in a fil..的解决方法
477 0
|
7月前
|
Python
GEE—关于RSEI生态遥感指数中出现的问题 Layer error: Image.rename: The number of names (1) must match the number of..
GEE—关于RSEI生态遥感指数中出现的问题 Layer error: Image.rename: The number of names (1) must match the number of..
217 0
|
网络虚拟化
使用ChatGPT Access denied,Error reference number: 1020问题解决
使用ChatGPT Access denied,Error reference number: 1020问题解决
使用ChatGPT Access denied,Error reference number: 1020问题解决
|
SQL 并行计算 数据库连接
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
|
API Android开发
Flutter导入第三方包后报错The number of method references in a .dex file cannot exceed 64K
Flutter导入第三方包后报错The number of method references in a .dex file cannot exceed 64K
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
error C2041: illegal digit ‘9‘ for base ‘8‘ | error C2059: syntax error: ‘bad suffix on number‘
146 0
|
安全 关系型数据库 MySQL
xtrabackup 问题“Too many open files”system error number 24
一个MySQL数据库备份的时候出现下面的错误
203 0
|
Ubuntu JavaScript
ubuntu 文件监视数量 Error: ENOSPC: System limit for number of file watchers reached, watch‘所在文件路径‘
vue 运行执行 npm run dev | * Error: ENOSPC: System limit for number of file watchers reached, watch’所在文件路径’ 最简单的命令 沾走就能用
225 0
ubuntu 文件监视数量 Error: ENOSPC: System limit for number of file watchers reached, watch‘所在文件路径‘