libxslt only works up to Node18. You'll have to replace it by another library that does a similar job. I tried libxslt-wasm, which does a pretty similar job and runs with Node22. If you're using typescript, this library doesnt compile with module commonjs. There is also xslt-processor that does the basic, but is far more limited than libxslt.