run: npx gltfjsx model.gltf
See original GitHub issueBefore asking I like to do some research but I have a question that I can’t solve, according to the pmndrs/gltfjsx github documentation info:
A typical use-case
First you run your model through gltfjsx. npx allows you to use npm packages without installing them.
I run the command **npx gltfjsx shoe.gltf**
and it gives me the following error:
(node:12892) 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.fetch (node:internal/deps/undici/undici:11118:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Thanks in advance for the help.
Attach:
Issue Analytics
- State:
- Created 9 months ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Running npx gltfjsx Model.gltf fails with Error: Invalid hook call.
When running npx gltfjsx Model.gltf against any gltf model it fails. It returns this Error. ERROR Objects are not valid as a React...
Read more >gltfjsx - npm
First you run your model through gltfjsx. npx allows you to use npm packages without installing them. npx gltfjsx model.gltf --transform.
Read more >Gltfjsx NPM
First you run your model through gltfjsx. npx allows you to use npm packages without installing them. npx gltfjsx model.gltf.
Read more >GLTFJSX - React Three Fiber Tutorials - sbcode.net
Description. GLTFJSX is a command line tool that will read through a glTF model, and extract its components into a JSX equivalent.
Read more >Working with GLTF models in React.js - YouTube
Import GLTF model into React.js to build a product customizer with react-three-fiber. GLTF files can be exported from blender.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solution and is working for me:
`When using GLTFJSX, you may get the error,
TypeError: fetch failed at Object.fetch (node:internal/deps/undici/undici:11118:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
At the time of writing this warning, the latest LTS version of Node.js and GLTFJSX are incompatible.
Only if you get this error, you can execute a version of GLTFJSX that contains the fix.
For example, instead of running,
npx gltfjsx ./public/models/shoe-draco.glb
run this,
npx ggozad/gltfjsx#fix-dependencies ./public/models/shoe-draco.glb
Remember to only try this if you are experiencing the problem. The actual fix to GLTFJSX should be merged soon.
Another option is to unistall your version of NodeJS and install the specific NodeJS 16.18 LTS instead.
Install packages for your operating system can be found at https://nodejs.org/download/release/v16.18.1/`
Source: https://sbcode.net/react-three-fiber/gltfjsx/
In case you need some help, just contact me.
Thanks for restoring. I thought it was too late and gone forever.
Yours works as expected.
and my experience of the latest GLTFJSX 6.0.1