【问题标题】:Local Server Auto Refresh of create-react-app is not working in my VMcreate-react-app 的本地服务器自动刷新在我的 VM 中不起作用
【发布时间】:2020-06-07 11:32:42
【问题描述】:

create-react-app 的本地服务器自动刷新在我的虚拟机中不起作用:当我更新我的代码时,服务器没有自动更新。

我使用 Ubuntu 作为操作系统,使用 VSCode 编写代码,使用 VSCode 终端在本地运行应用程序。

本地启动命令: npm start

【问题讨论】:

    标签: javascript reactjs typescript create-react-app


    【解决方案1】:

    我创建了一个 .env 并将 CHOKIDAR_USEPOLLING=true 添加到其中。 为什么?这确保了下次运行 npm start 时,观察者会根据虚拟机内部的需要使用轮询模式。

    从这里得到这个: Development server of create-react-app does not auto refresh

    还有答案。

    【讨论】:

      猜你喜欢
      • 2017-09-02
      • 2020-12-23
      • 2019-10-01
      • 1970-01-01
      • 2018-09-16
      • 2018-12-21
      • 1970-01-01
      • 1970-01-01
      • 2018-06-18
      相关资源
      最近更新 更多