Development server of create-react-app does not auto refresh

后端 未结 17 1552
清酒与你
清酒与你 2020-12-01 07:30

I am following a tutorial on React using create-react-app. The application is created by create-react-app v1.3.0

create-react-app my-app

T

17条回答
  •  天命终不由人
    2020-12-01 07:57

    In WSL2 work for me, "If the project runs inside a virtual machine such as (a Vagrant provisioned) VirtualBox, create an .env file in your project directory if it doesn’t exist, and add CHOKIDAR_USEPOLLING=true to it. This ensures that the next time you run npm start, the watcher uses the polling mode, as necessary inside a VM."

    Or just run: $ CHOKIDAR_USEPOLLING=true npm start

提交回复
热议问题