After NPM start is passed, the jump browser displays blank and an error occurs when the console is opened, as shown in the figure:
This problem is caused by the react-devtools extension installed on the browser. Many people simply disable the react-devtools extension, but it is a temporary solution.
Root cause: The React and dev-tools versions are incorrect
View information about the React version: NPM info reactorYARN info React
Method one:
According to the error stack information, find node_modules / @ PMMMWH/react – refresh – webpack – the plugin/client/ReactRefreshEntry js the file, find the error code, annotations directly lead to the error of the line.
Method 2:
Now I use scaffolding to create the react program version is ^ 17.0.2, so, you should not use the react – devtools v3 version, you should use the v4 version, attach the v4 plug-in address: www.crx4chrome.com/crx/3068/.
Download the plugin directly and change the plugin’s.crx suffix to **.rar** : Fmkadmapgofadopljbjfkapdkoienihi-4.10.1-1242020-Crx4Chrome.com.crx — — — — — > > After fmkadmapgofadopljbjfkapdkoienihi-4.10.1-1242020-Crx4Chrome.com.rar then unzip the file, unzip the diagram below:
Next, open the extension page chrome:// Extensions/in Google Chrome, open developer mode, select load the extracted extension file, add it and close developer mode, preferably restart the browser. Finally, run the project, no longer error, of course, V4 version with V3 or some differences, and then slowly explore learning ~