When I was writing a project, I encountered this error. I searched for some solutions from the Internet, but none of them were resolved.
Solutions:
First of all, I ran the project and reported an error. I checked the node version to see if it was too low. If it is version 14, then node needs to be upgraded. At present, node has been upgraded to 19, and it can be upgraded to 16. It does not need to be too high
After updating the node version, I found that he still reported an error
Then I searched and reported errors from the Internet. After countless times of stepping on the pit, I found out that it was a browser problem. I changed to another browser to run, and there was no problem at all. When I used Google Chrome, I reported an error.
Then I checked the version of Google Chrome and found that it needs to be updated. I haven’t paid attention to this issue before.
After updating Google Chrome, it can be used normally
Summarize:
After discovering this error, don't worry, first check whether the node version is too low, if it is normal, go to the next step
Then check whether the browser version is too low, if it is too low, upgrade
Then the problem is solved