Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1274

Downgrading to compatible version of SockJS-Client

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/holloway/master into master Dec 14, 2016
  • Overview 6
  • Commits 1
  • Pipelines 0
  • Changes 1

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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/holloway/master