Hello everyone,
I am having issues with parcel's hot module replacement functionality using q2 create_extension with a client side tecton extension integrated with react. I am developing this on the shared dev server. I thought that perhaps it was something I had done with my specific react code, so I installed a fresh boilerplate extension through the cli and am running into the same issue.
If I install a base client side rendered extension with react integrated, start my server, then view the extension, the parcel watcher web socket connection will always fail, and then the parcel HMR server connection is reported as being lost.
Browser console log after a few seconds of landing at the main page:
WebSocket connection to 'wss://sdk-shared-dev.q2devstack.com:50998/' failed: index.b4b6dfad.js:819
undefined ws.onerror @ VM211 index.b4b6dfad.js:819 index.b4b6dfad.js:822
[parcel] 🚨 Connection to the HMR server was lost
Here is the generated package.json file:
{
"private": true,
"scripts": {
"test": "echo Frontend testing not configured",
"test-cov": "echo Frontend testing coverage not configured",
"lint": "echo Frontend linting not configured",
"build": "parcel build --public-url '.' src/index.html",
"dev": "parcel watch --public-url '.' src/index.html --hmr-port=50998"
},
"dependencies": {
"react": "17.x",
"react-dom": "17.x",
"react-router-dom": "6.x",
"q2-tecton-sdk": "v1.10.6"
},
"devDependencies": {
"parcel": "^2.0.0"
}
}
Can anyone provide any guidance to what could be happening? HMR would make development much nicer.
Thank you.
Hi Dan,
I tried creating the csr extension with react framework and could not reproduce the error. I don't error related to parcel in the browser console. Could you try it on a different machine to verify.
Thank you.
— Priyanka Buddula 4 years agoHi Priyanka, thanks for checking it out. This is on the Shared Dev Server. We exclusively develop on that server. Would a different machine make a difference in this case, since that server is hosting the files and the dev parcel watcher/server? I will have my colleague try from his machine just to rule it out and report back. Thanks.
— Dan Collins 4 years agoHi Priyanka, my colleague confirmed that the HMR server has the same issue for him. It doesn't appear to be specific to my machine.
— Dan Collins 4 years agoHi Dan. Would it be possible to try it on a personal computer where your company's it rules are not in effect just to confirm if the it rules have something to do with the issue.
— Priyanka Buddula 4 years agoI did try the same process on my personal machine with AV/Firewall temporarily disabled. The same result occurred.
— Dan Collins 4 years ago