Browsersync Laravel混合,错误:观看ENOSPC投掷呃;未处理的'错误'事件

问题描述 投票:0回答:1

当我在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)

enter image description here

webpack browser-sync laravel-mix
1个回答
0
投票

ENOSPC是“无空间可用错误”。

您需要做的是通过在终端中运行此命令来增加可以查看的最大文件数量:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
© www.soinside.com 2019 - 2024. All rights reserved.