Gruntjs Grunt serve watch错误-等待…;警告错误:观看电脑

Gruntjs Grunt serve watch错误-等待…;警告错误:观看电脑,gruntjs,Gruntjs,在Linux上运行grunt-service会创建一个无限循环: $ grunt serve Running "watch" task Waiting... Warning: watch ENOSPC Running "watch" task Waiting... Warning: watch ENOSPC ... 正在寻找使其工作的建议。尝试使用以下命令: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.c

在Linux上运行
grunt-service
会创建一个无限循环:

$ grunt serve
Running "watch" task
Waiting...
Warning: watch ENOSPC

Running "watch" task
Waiting...
Warning: watch ENOSPC
...
正在寻找使其工作的建议。

尝试使用以下命令:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

它应该可以工作。

在Ubuntu 15.04-64bitshi中工作得很完美,这个命令做什么?在Ubuntu 16.04中也可以工作!