gltfjsx
gltfjsx copied to clipboard
gltfjsx command error.
Hello, the following error occurs when I run the npx gtlfjsx model.gltf
command in a shell env and I'm a little confused. if anyone could point out what I'm doing wrong that would be amazing.
(node:6616) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use node --trace-warnings ...
to show where the warning was created)
Parse
TypeError: fetch failed
at Object.processResponse (node:internal/deps/undici/undici:5555:34)
at node:internal/deps/undici/undici:5877:42
at node:internal/process/task_queues:140:7
at AsyncResource.runInAsyncScope (node:async_hooks:203:9)
at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
have the same issue
same issue
Same issue! Have been stuck here for a couple hours. Help would be appreciated.
There's a few issues with gltfjsx and node 18, could be worth downgrading node to v16 and seeing if that works
As willmadd suggested, I downgraded to Node v16 by npm install -g n (the node version manager) sudo npm cache clean -f sudo n 16.16.0 use node -v to check the version (dont forget to go back to your current node version) then it worked!
Downgrading to Node v16.17.0
did the trick for me.
Same here, looks like it doesn't work on >16 versions of Node
While we wait for the fix for Node v18, instead of downgrading to Node v16..., you can try a fork of a fix,
try,
$ npx Sean-Bradley/gltfjsx#fix-dependencies [Model] [options]
instead of
$ npx gltfjsx [Model] [options]
merged and published it, sorry for the long delay!
i might have inadvertedly caused another node 18 issue by using squoosh in v6 🫠node and that brute forced esm switch is such a mess right now.
npx [email protected] ... will work, but no webp + squoosh (which has drastic size benefits) npx gltfjsx will most likely complain
i talked to don mccurdy and gltf-transform will soon kick out squoosh in favour of sharp, then all these issues should go away.
I use this to transform to mesh : https://gltf.pmnd.rs/