gltfjsx
gltfjsx copied to clipboard
error with command npx gltfjsx
After command : npx gltfjsx model.glb
TypeError: Failed to parse URL from /Documents/GIT/threejs/2022/sandbox.15.06.22/node_modules/draco3dgltf/draco_decoder_gltf.wasm
at new Request (node:internal/deps/undici/undici:4813:19)
at Agent.fetch2 (node:internal/deps/undici/undici:5539:29)
at Object.fetch (node:internal/deps/undici/undici:6370:20)
at fetch (node:internal/bootstrap/pre_execution:196:25)
at /Documents/GIT/threejs/2022/sandbox.15.06.22/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:39:485
at /Documents/GIT/threejs/2022/sandbox.15.06.22/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:40:128
at Object.createDecoderModule (/Documents/GIT/threejs/2022/sandbox.15.06.22/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:40:151)
at Object.<anonymous> (/Documents/GIT/threejs/2022/sandbox.15.06.22/node_modules/gltfjsx/src/bin/DRACOLoader.js:2:40)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
my npm list :
├── @emotion/[email protected]
├── @emotion/[email protected]
├── @fontsource/[email protected]
├── @mui/[email protected]
├── @mui/[email protected]
├── @mui/[email protected]
├── @react-three/[email protected]
├── @react-three/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @testing-library/[email protected]
├── @use-gesture/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
the problem is here draco CDN. is not found
a look here : https://github.com/google/draco/issues/888 && https://github.com/node-fetch/node-fetch/issues/1566
perhaps try to replace with : https://cdn.jsdelivr.net/npm/[email protected]/draco_decoder.wasm
I have the same problem
i use this to transform to mesh : https://gltf.pmnd.rs/
same, having the same problem
Seems that the package is not compatible with node 18, I downgraded to node 16 and it works fine.
Saved my sanity thank you @willmadd
i think nothing at the moment is compatible with node 18, i can't run anything, bundlers, all out of order due to breaking changes in some low level ssl stuff.
Thanks! I think, it'll be cool to add notes about Node 16 to README