htmx icon indicating copy to clipboard operation
htmx copied to clipboard

WebSocket and Server-Side Events live test suite not working

Open KianYang-Lee opened this issue 1 year ago • 2 comments

After git cloning this repository and following the instructions at https://github.com/bigskysoftware/htmx/blob/master/test/ws-sse/README.md to run node server.mjs, the server does not actually work. The server did launch but when visiting the site locally, it returns this error:

[Error: ENOENT: no such file or directory, open '../../src/ext/ws.js'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '../../src/ext/ws.js'
}

Upon investigation, there is no such ws.js file in the said directory too. So it could be either misleading README instruction, or the file is indeed missing.

KianYang-Lee avatar Oct 05 '24 02:10 KianYang-Lee

Hey, yep that's something we totally forgot and left behind when releasing htmx 2. Extensions have moved to a separate repository, and this test suite should also go there. Extensions are now published as their own package, I would expect it to be as simple as replacing the relative import path with the CDN one, but since we didn't run this in a long time, I can't guarantee it isn't obsolete.

If you'd like to investigate & open a PR on the extensions repository to add this test suite in, then another PR on this repo to remove it, please feel free to do so, those would be much welcome!

Telroshan avatar Oct 05 '24 07:10 Telroshan

Sure will do so @Telroshan

KianYang-Lee avatar Oct 07 '24 02:10 KianYang-Lee

@Telroshan time to close?

KianYang-Lee avatar Nov 20 '24 02:11 KianYang-Lee

Indeed, ty!

Telroshan avatar Nov 20 '24 07:11 Telroshan