Created by: dmile
Original issue: #6720 (closed) Root cause: https://github.com/sockjs/sockjs-client/issues/474#issuecomment-482918785 This is a PR for naive idea how to fix it: https://github.com/facebook/create-react-app/issues/6720#issuecomment-484034646
Activity
requested review from @root
requested review from @root
requested review from @root
requested review from @root
requested review from @root
added CLA Signed label
mentioned in merge request !7318 (closed)
mentioned in issue #6720 (closed)
assigned to @root
added tag: bug fix label
changed milestone to %3.1
Created by: dmile
Can you provide testing criteria for this please @dmile?
[Edit] A test repository would actually be ideal.
Testing is pretty simple, not sure that special repository needed:
- Add a proxy field to your package.json, for example:
"proxy": "http://localhost:4000"
- Run the app in the development mode. Open http://localhost:3000 to view it in the Firefox.
Errors like:
-
The development server has disconnected ...
in browser console -
Proxy error: Could not proxy request /sockjs-node/947/wwr0adlx/websocket from localhost:3000 to http://localhost:4000 ...
in app console (if you make code edits)
should disappear
- Add a proxy field to your package.json, for example:
Created by: dmile
@patilharshal16 For now, there is no way to configure it. This path is more like a constant than variable: https://github.com/facebook/create-react-app/blob/b96ac6c2c007db85812a6e9c0ec54509019c0fea/packages/react-dev-utils/webpackHotDevClient.js#L66-L67 P.S. Webpack has special sockPath option. But I don't know how to pass it to
webpackHotDevClient
andWebpackDevServerUtils
. Any suggestions?Created by: dmile
@iansu
can I get your thoughts on this?
@patilharshal16
the hard-coded path is a good approach?
I've created a branch with configurable socket path. Based in this http://metis.lti.cs.cmu.edu:8023/facebook/create-react-app/-/merge_requests/6280#issuecomment-494870564. if current bugfix will be approved, I'll create the new PR.
mentioned in issue #7420 (closed)