This repository was archived by the owner on Jan 12, 2025. It is now read-only.

Description
Hello, i'm using pyodide and ifcopenshell wasm inside a React application but i got an error while the installation of the WASM file.
I placed the WASM file inside the root folder of my application, and then inside the App.js file i initialise the pyodide using the relative npm package inside a function that is called during the first render of the React component:
const { loadPyodide } = require("pyodide");
const initPyodide = async (code) => {
const pyodide = await loadPyodide({
indexURL : "https://cdn.jsdelivr.net/pyodide/v0.23.4/full/",
});
await pyodide.loadPackage("micropip");
const micropip = await pyodide.pyimport("micropip");
await micropip.install('../IfcOpenShell-0.7.0-py3-none-any.whl');
console.log(await pyodide.runPython(`
import ifcopenshell
ifcopenshell.version`));
return "IfcOpenShell loaded";
}
Everything works fine until the
await micropip.install('../IfcOpenShell-0.7.0-py3-none-any.whl');
line, where an exception is thrown:

I'm quite new to WASM and so on, if someone could help me and explain what i'm doing wrong i would appreciate it a lot.