[nodemon] Error: watch /xxx/ ENOSPC 解决方法

简介:

 软件环境 ubuntu18.04, "nodemon": "^1.17.5"

 解决方法

命令行输入 
echo fs.inotify.max_user_watches=666666 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

解释一下这行命令的意思
echo fs.inotify.max_user_watches=666666的输出内容,
也就是"fs.inotify.max_user_watches=666666"通过|传给后面的命令,然后tee将前面的传过来的内容输出到标准输出的同时,追加到文件file中。如果文件不存在,则创建;如果已经存在,就在末尾追加内容,而不是覆盖,最后是系统重新加载配置文件,使更改生效.
大家可以到/proc/sys/fs/inotify下查看自己更改的值
错误原因
  就是一个程序监控的文件数量超出了设定值,这行命令就是把设定的值改大一些
进一步了解
inotify -- linux内核中的文件系统变化通知机制,我猜nodemon的watch就是通过他来实现的

目录
相关文章
|
缓存 JavaScript
运行vue报错npm ERR! A complete log of this run can be found in解决办法
在这里我们需要清除npm的缓存: (1)在cmd命令行窗口中输入:npm cache clean --force (2)然后再运行我们需要安装模块的命令,输入npm install。 有时是网络问题,依赖包加载不完整,删掉node_modules文件后,重新执行npm install即可。
2228 0
vuecli3 启动服务的时候报错:TypeError: Cannot read property ‘upgrade‘ of undefined
vuecli3 启动服务的时候报错:TypeError: Cannot read property ‘upgrade‘ of undefined
287 0
vuecli3 启动服务的时候报错:TypeError: Cannot read property ‘upgrade‘ of undefined
|
4月前
|
Ubuntu Unix Shell
sh执行脚本报错Syntax error: “(“ unexpected ​的两种解决办法
​sh执行脚本报错Syntax error: “(“ unexpected ​的两种解决办法
|
9月前
|
JavaScript
解决vue项目build之后部署到服务器访问的时候出现报错:Uncaught SyntaxError: Unexpected token ‘<‘ chunk-vendors:XXXXXX
解决vue项目build之后部署到服务器访问的时候出现报错:Uncaught SyntaxError: Unexpected token ‘<‘ chunk-vendors:XXXXXX
解决vue项目build之后部署到服务器访问的时候出现报错:Uncaught SyntaxError: Unexpected token ‘<‘ chunk-vendors:XXXXXX
|
9月前
|
资源调度 前端开发
npm/yarn link 测试包时报错 Warning: Invalid hook call. Hooks can only be called ...
npm/yarn link 测试包时报错 Warning: Invalid hook call. Hooks can only be called ...
115 0
|
JavaScript 前端开发 测试技术
npm run dev启动报错:TypeError: Cannot read property 'upgrade' of undefined
npm run dev启动报错:TypeError: Cannot read property 'upgrade' of undefined
276 0
|
Python
pyinstaller打包exe后不能运行报Failed to execute script XXXX问题分析与处理
pyinstaller打包exe后不能运行报Failed to execute script XXXX问题分析与处理
701 0
|
缓存 JavaScript Nacos
Vue 报错整理:npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\jinchuang\AppData...
我是在npm install的时候出现的这个问题,开始是安装不上,提示升级npm,然后我按要求升级npm i npm 依然报错 解决方法:1. 删除本地node_modules 依赖包2. 执行 npm cache clean --force 清理缓存3. npm install。
731 0
|
Shell Go
goland 解决 cannot resolve directory 'xxxx'/ cannot resolve xxx 问题
goland 解决 cannot resolve directory 'xxxx'/ cannot resolve xxx 问题
goland 解决 cannot resolve directory 'xxxx'/ cannot resolve xxx 问题
|
JavaScript
Vue运行时报错:ERROR Failed to compile with 1 errors ,浏览器报错:Cannot GET /
Vue运行时报错:ERROR Failed to compile with 1 errors ,浏览器报错:Cannot GET /
1393 0
Vue运行时报错:ERROR Failed to compile with 1 errors ,浏览器报错:Cannot GET /

热门文章

最新文章