Using create-react-app to build a project, how to solve the following error message when running the project?

A simple entry project is built using create-react-app 1.5.2, but the following error message always appears during use:

:WebSocket connection to "ws://localhost:3000/sockjs-node/005/a3iekcct/websocket" failed: websocket.js: 6 Error in connection establishment: net::ERR_ADDRESS_IN_USE

:

in short, after repeatedly refreshing the page, the console is in an unknown state of normal, error figure 1, and error figure 2.

A novice has just started to learn React, and asked the old man to tell me what the reason is. Is there any solution?

Apr.09,2021

1. It seems to be the problem of websocket, that is, the problem of hot loading
2. You can delete the node_modules directory and reinstall the dependency


whether port 3000 is occupied?

Menu