-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
setwasmpath error for web-ifc-viewer in Gatsby.js #20119
Comments
The wasm file you are trying to load has had its import names minified as part of code size optimization. That is why the import its looking for is The JS code that loads this was module is automatically generated by emscripten and embeds these minified names. Perhaps you updated the wasm file without also updating the JS loading code. The JS loaded code (web-ifc-api.js) must match exacltly the wasm file.. they are built together as unit. |
@sbc100 Btw, I am not clear howto match the JS loading code with wasm file. Regards. |
When you build a wasm file with emscripten it also produces a js file. In your case it looks like that file is called web-ifc-api.js. If you didn't build that file then the best course of action is probably to find out who did and go to talk to them about your issue. |
@sbc100 Let me send msg to web-ifc-viewer team, too. |
Hello, I understand this response may come late, but I hope it can assist others facing a similar issue. I encountered the following error: This error originates from In an Angular project, I configure this in my "assets": [
{
"glob": "**/*",
"input": "./node_modules/web-ifc-three/node_modules/web-ifc/",
"output": "./assets/"
}
], This configuration worked for me. I hope it helps others as well. |
I have one gatsby.js project to import \*.ifc file and display it in the web browser.
I installed web-ifc-viewer package and copy the 2 files web-ifc.wasm and web-ifc-mt.wasm from its node_modules folder into the component folder, and tried to render sample ifc file but it returns failure.
I also tried to copy 2 wasm files into the public folder, root folder and static folder separately, but got same error.
I created new folder
WebIfcViewer
inside src / components / and add 3 filesHere is the code in the index.tsx.
Here is my package.json.
Behavior and Results:
When I run this, it displays like this screen Rendered UI
If I pick the ifc file called 1.ifc, then it doesn't work and I can see some errors in the browser console.
Here is its content.
My working Environment:
Question:
How can I resolve this wasm path in gatsby project?
The text was updated successfully, but these errors were encountered: