React app error: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS

后端 未结 8 1554
南方客
南方客 2020-12-01 10:29

I am deploying a React app but am getting a strange error when I visit the page over https.

When I visit the page over https I receive the following error:

S

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 10:54

    anyone who is struggling with this issue on heroku deployment downgrade you reac-scripts module to 3.2.0 .

    1. remove package-lock.json file
    2. remove node_modules folder
    3. replace react-scripts version to 3.2.0
    4. npm install all modules again

提交回复
热议问题