Open HuStmpHrrr opened 4 years ago
You can workaround this by manually downloading the necessary files, of course. But it would be nice to have it working naturally with https.
i did. but still, it's one step away from making the domain work with https.
I tried this locally as recommended, however I'm getting an error loading a (what appears to be generated) .wasm
file.
http://localhost:4000/ef253ef29e2f057334f77ead7f06ed8f22607d38.wasm
This issue seems to be related to the way the module is loaded not matching the way the script is loaded. I confirmed the issue is also present when loading from an HTML file directly (without localhost:4000
).
Sorry if this isn't very clear.
I tried this locally as recommended, however I'm getting an error loading a (what appears to be generated)
.wasm
file.http://localhost:4000/ef253ef29e2f057334f77ead7f06ed8f22607d38.wasm
This issue seems to be related to the way the module is loaded not matching the way the script is loaded. I confirmed the issue is also present when loading from an HTML file directly (without
localhost:4000
).Sorry if this isn't very clear.
that's because you didn't copy the web assembly. this library is composed of both js and web assembly. this is tricky, but I have successfully deployed on my own website, but I don't remember how exactly I did that. you probably need to modify the js files, I guess? I suppose some file contains some hard coded paths.
I am too lazy to figure this out again, but if you want to see a work example, please check my personal website, where I used this library here: https://hustmphrrr.github.io/asset/thesis-prep/#/4/2
the source: https://github.com/HuStmpHrrr/site-source/blob/master/static/asset/thesis-prep/js/tikzjax/
in fact it's here:
Sorry, but at my site, which uses https protocol it still doesn't work. I copied your files from git above. I also checked with working example from your link above, and I copied same files. It still doesn't work.
Here's link: https://matematyka.pl/tikz/tikz.html
It prints in console:
Uncaught (in promise) RuntimeError: unreachable
at wasm-function[33]:0x3369
at wasm-function[35]:0x3b89
at wasm-function[57]:0x53fd
at wasm-function[34]:0x3403
at wasm-function[160]:0x1a58d
at wasm-function[161]:0x1a6a3
at wasm-function[375]:0x6135d
at wasm-function[382]:0x6e506
It’s strange, cause here even old code works https://fillthecode.com/tikz/tikz.html
Please help. Thank you. Mike
idk. you'd better check if you've changed the right js file and if your wasm file is complete.
in case of a page using this library via an https request, tikzjax will not work because it only exposes http links. any chance put this library in some https cdn?