【问题标题】:Browsersync Laravel mix, Error: watch ENOSPC throw er; Unhandled 'error' eventBrowsersync Laravel mix, Error: watch ENOSPC throw er;未处理的“错误”事件
【发布时间】:2019-08-28 12:04:38
【问题描述】:

当我在 Laravel 中运行 npm run watch-poll 并使用 browsersync 功能时:

mix.browserSync('https://vuravel.local')

我收到了这个奇怪的错误。我不知道如何解决这个问题。有什么想法吗?

我在 Ubuntu 上运行 apache 服务器,并使用 Google Chrome 作为浏览器。

[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)

【问题讨论】:

    标签: webpack browser-sync laravel-mix


    【解决方案1】:

    ENOSPC 是“没有可用空间错误”。

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

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

    【讨论】:

      猜你喜欢
      • 2022-11-12
      • 2017-06-23
      • 2019-08-21
      • 2018-11-19
      • 2020-12-12
      • 2018-05-04
      • 1970-01-01
      • 2019-11-10
      • 2016-10-13
      相关资源
      最近更新 更多