Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leaflet.distortableimage.js:5056 WebSocket connection to 'ws://localhost:8081/ws' failed: #1393

Open
Surajbisht15 opened this issue Jan 2, 2024 · 3 comments
Labels

Comments

@Surajbisht15
Copy link

How I remove websocket error
WebSocket connection to 'ws://localhost:8081/ws' failed.

I am using:
Angular 16.x.x
Node 16.20.1

@Preefix
Copy link

Preefix commented Mar 19, 2024

Why is no one taking care of it? Is no one maintaining this lib anymore?

@Preefix
Copy link

Preefix commented Mar 19, 2024

@Surajbisht15 I fixed it using the https://www.npmjs.com/package/string-replace-loader

You could include the following rule insdie your webpack config file to replace websocket function which generates the error on your client

{ test: /leaflet\.distortableimage\.js$/, use: [{ loader: 'string-replace-loader', options: { search: /var WebSocketClient =.*?(\}\);)/gs, replace: function(match) { return match.replace('this.client = new WebSocket(url);', 'this.client = {};'); }, }, }, ], },

@maximbroos
Copy link

Such a pity this wonderful library is not supported anymore. I sadly don't have the skills to fix it, but this bug makes it unusable right now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants