Friday, August 26, 2016

[nodemon] Internal watch failed: watch ENOSPC solution

 运行环境:CentOS 7,  node.js v5.11.1, nodemon 1.10.2
  在WS自带的终端输入nodemon server.js启动项目,报如下错误提示,服务能正常跑,但是无法监测文件修改。
[nodemon] Internal watch failed: watch *** ENOSPC
  解决办法是在终端输入如下命令,然后重新运行nodemon server.js。
echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
  注意,在WS的终端执行Ctrl + C并不能结束node进程,从而导致下一次服务启动时端口被占用而失败。正确的方法是直接点击终端窗口旁边的红色小叉以结束掉当前会话。

From original blog
http://www.cnblogs.com/jaxu/p/5568703.html

Centos: Cannot login GUI, file too large

Usually, the /root disk is full.
Just remove some useless files.
/var/crash stores some large files.