For the second, Iām assuming youāre using python src/serve_javascript_lib.py and trying the new RESTHopper samples. Iāve just pushed a change to make those samples use a relative URL to rhino3dm.js and compute.rhino3d.js; Hopefully that fixes this for you
For future reference, Iāve found http-server to be really handy for getting around CORS issues when testing things locally.
Thanks, this is super helpful. I managed to get the node sample working, on its own and with the added the code I was failing with.
Iām trying to use the node package in a Vue project, though, and am still having the same issues. Seems like my problem might be related to that.
Some early searching is calling out webpack as the culprit. Do you happen to have any experience/examples using the library with a framework? RESThopper used Ionic and v0.0.9 at the hackathon, but Iām still having no luck if I roll back to that.
Will tinker and report back, hoping for the bestā¦
Going to put a pin in this before I burn a whole week on it. Issue appears to be directly related to the vue-cli-service and way above my pay grade and level of expertise. Smells like fetch is being served some sort of optimised or compressed version of rhino3dm.wasm, but Iām having trouble confirming/fixing that.
Going to pursue alternate options. The help was v appreciated!
Sorry youāre still having trouble! If you have some code you can share (public or private) then we can have a go at figuring out the issue. I donāt have any experience with Vue.js myself but I think @fraguada mightā¦
Totally! The project repo is here. The code block in question today is here.
Iāve already gotten it running outside of Vue, and thatās more than good enough for now. Would just be good to know whatās going on here. Will revisit after my deadline.
@fraguada did you manage to get the library working as an npm import in a Vue project? The /public workaround worked, but Iām running into the same issue again when trying to work with Vue + Typescript.
This problem is still haunting me, but I took another stab while tinkering with wasm. No fixes, but new discovery: it seems that whatever vue is using for build/serve is ignoring npm wasm files or putting them in the wrong place.
I am trying the same, with the Extrusions resthopper for Vue, but donāt get it to work with the WASM. Any clue? or example ? The one shared doesnāt seem to have the app.js somewhere.