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
342 0
|
3月前
|
CDN
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
Iconfont——Error: <path> attribute d: Expected number, "MNaNNaNaNaNNaNNaN…".
37 0
|
关系型数据库 MySQL
Mysql报错:InnoDB: Operating system error number 13 in a fil..的解决方法
Mysql报错:InnoDB: Operating system error number 13 in a fil..的解决方法
426 0
|
6月前
|
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..
196 0
|
SQL 并行计算 数据库连接
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
ArcSWAT报错:Error Number :-2147467259; 对 COM 组件的调用返回了错误 HRESULT E_FAIL
|
网络虚拟化
使用ChatGPT Access denied,Error reference number: 1020问题解决
使用ChatGPT Access denied,Error reference number: 1020问题解决
使用ChatGPT Access denied,Error reference number: 1020问题解决
|
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‘
140 0
|
安全 关系型数据库 MySQL
xtrabackup 问题“Too many open files”system error number 24
一个MySQL数据库备份的时候出现下面的错误
187 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’所在文件路径’ 最简单的命令 沾走就能用
216 0
ubuntu 文件监视数量 Error: ENOSPC: System limit for number of file watchers reached, watch‘所在文件路径‘

热门文章

最新文章