xeokit / xeokit-convert

Convert various AEC model formats for efficient viewing in the browser with xeokit.

Home Page:https://xeokit.github.io/xeokit-convert/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

convert2xkt.js TypeError: Failed to parse URL from web-ifc.wasm

fengelhardt opened this issue · comments

Hi,

I have newly installed xeokit-convert:

git clone https://github.com/xeokit/xeokit-convert.git
cd xeokit-convert
git checkout v1.1.3 # I did this to have a stable release, but same with 1.1.6
npm install

Running the script, however, fails: (omitting my file paths here)

node convert2xkt.js -s <...>/00-7456-Logistic.ifc -o <...>/00-7456-Logistic.xkt -l
[convert2xkt] Running convert2xkt v1.1.3...
[convert2xkt] Reading input file: <...>00-7456-Logistic.ifc
[convert2xkt] Input file size: 55243.86 kB
[convert2xkt] Using parser: parseIFCIntoXKTModel
Error: TypeError: Failed to parse URL from /home/fengelha/src/xeokit-convert/node_modules/web-ifc/./web-ifc.wasm

But the wasm file exists under this path:

file /home/fengelha/node_modules/web-ifc/./web-ifc.wasm
--> /home/fengelha/node_modules/web-ifc/./web-ifc.wasm: WebAssembly (wasm) binary module version 0x1 (MVP)

I first thought it could have something to do with my installation method via git clone. I followed the installation instructions from here: https://www.notion.so/Converting-Models-to-XKT-with-convert2xkt-fa567843313f4db8a7d6535e76da9380 / Installing convert2xkt.

But I also get the same error when installing with npm install @xeokit/xeokit-convert.

My node --version is v18.13.0

Hi !

What seems to work for me was to use the option --no-experimental-fetch when executing convert2xkt :

node --no-experimental-fetch ./convert2xkt.js -s foo.xkt -o bar.ifc

Found the solution here

Seems we have a workaround - thanks @TitouanGisle - closing now