Created by: holloway
As discussed on #1268 (closed) there are two incompatible versions of SockJS-Client being used which prevents hot reloads when websocket connections are unavailable (e.g. when a browser doesn't support websockets, or when a CRA app is being proxied by a server that doesn't support them -- the later being my use case).
Normally SockJS can recover from this because it can use AJAX etc., but with two different versions of SockJS-Client it gives up, and throws this error:
Incompatibile SockJS! Main site uses: "1.0.3", the iframe: "1.0.1"
Specifically SockJS-Client 1.0.3 (packages/react-dev-tools/package.json
is incompatible with SockJS-Client 1.0.1 (react-scripts@0.8.4
depends on webpack-dev-server@1.16.2
which depends on sockjs@^0.3.15
which installs sockjs@0.3.18
that defaults to a CDN version of 1.0.1).
It seems this bug was solved properly in webpack-dev-server@2.1.0-beta.5 and later but afaik that's not yet released.
This PR is just a quick one-liner fix that reverts to 1.0.1 in the meantime.