gltfjsx icon indicating copy to clipboard operation
gltfjsx copied to clipboard

error with command npx gltfjsx

Open ppacory opened this issue 2 years ago • 8 comments

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]

ppacory avatar Jun 15 '22 16:06 ppacory

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

ppacory avatar Jun 15 '22 18:06 ppacory

I have the same problem

soul-on-you avatar Jun 25 '22 11:06 soul-on-you

i use this to transform to mesh : https://gltf.pmnd.rs/

ppacory avatar Jun 25 '22 12:06 ppacory

same, having the same problem

benjaminha14 avatar Jul 12 '22 22:07 benjaminha14

Seems that the package is not compatible with node 18, I downgraded to node 16 and it works fine.

willmadd avatar Aug 01 '22 21:08 willmadd

Saved my sanity thank you @willmadd

superdwayne avatar Nov 01 '22 10:11 superdwayne

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.

drcmda avatar Nov 01 '22 11:11 drcmda

Thanks! I think, it'll be cool to add notes about Node 16 to README

matrix-root avatar Nov 13 '22 06:11 matrix-root