'create-react-app application becomes non-interactive after fast refresh

I have noticed that with the latest version of create-react-app ([email protected], also had this problem in the latest @4.x.x version) the page becomes non-interactive after fast refresh. By non-interactive, I mean that I cannot click, drag, select or perform any other mouse action on it.

I disabled fast refresh by adding FAST_REFRESH=false to the .env file and everything worked fine, but fast refresh is very useful once your project gets big and takes longer to compile.

By default the react-scripts (in the project, not globally) version was @0.9.5, but I had to change it to @^4.0.3 for it to work (app does not work properly with @0.9.5).

I am running Linux 20.04.



Solution 1:[1]

Check your browser console for errors. I was seeing a similar error with [email protected] and [email protected]. When a page crashes or freezes like that the console is a good place to look.

The solution was found here. In my case I just added the resolution and ran npm install.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elliot Young