当我在Laravel中运行npm run watch-poll
并使用特色browsersync时:
mix.browserSync('https://vuravel.local')
我收到这个奇怪的错误。我不知道如何解决这个问题。有任何想法吗?
我在Ubuntu上运行apache服务器,谷歌浏览器作为浏览器。
[Browsersync] Access URLs:
---------------------------------------
Local: https://localhost:3000
External: https://192.168.1.244:3000
---------------------------------------
UI: http://localhost:3001
UI External: http://localhost:3001
---------------------------------------
[Browsersync] Watching files...
events.js:183
throw er; // Unhandled 'error' event
^
Error: watch /path/to/root/***.php ENOSPC
at _errnoException (util.js:1022:11)
at FSWatcher.start (fs.js:1382:19)
at Object.fs.watch (fs.js:1408:11)
ENOSPC是“无空间可用错误”。
您需要做的是通过在终端中运行此命令来增加可以查看的最大文件数量:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p