gltfjsx
gltfjsx copied to clipboard
Error at M2 MacBook Air
(base) weipingtong@Weis-MacBook-Air my-3d-model % npx gltfjsx avatar.glb
ERROR Objects are not valid as a React child (found: Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.). If you meant to render a collection of children, use an array instead.
-
- You might have mismatching versions of React and the renderer (such as React DOM)
-
- You might be breaking the Rules of Hooks
-
- You might have more than one copy of React in the same app -See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.). If you meant to render a collection of children, use an array instead. -throwOnInvalidObjectT (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development pe .js:4612:15) -createChild (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:4850:7)
-reconcileChildrenArr (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development. y js:5100:25) -reconcileChildFibe (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js s :5506:14) -reconcileChildre (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:8 417:28) -updateHostComponen (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js :9059:3) -beginWork (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:10507:14)
-Object.invokeGuardedCallba (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.develo
kProd pment.js:12101:10)
-invokeGuardedCallba (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.j
k s:12292:31)
-beginWork$1 (node_modules/ink/node_modules/react-reconciler/cjs/react-reconciler.development.js:16531:
7)
(node:24384) 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)
TypeError: Failed to parse URL from /Users/weipingtong/Desktop/my-3d-model/node_modules/draco3dgltf/draco_decoder_gltf.wasm
at new Request (node:internal/deps/undici/undici:5446:19)
at Agent.fetch2 (node:internal/deps/undici/undici:6242:25)
at Object.fetch (node:internal/deps/undici/undici:7076:20)
at fetch (node:internal/bootstrap/pre_execution:199:25)
at /Users/weipingtong/Desktop/my-3d-model/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:39:485
at /Users/weipingtong/Desktop/my-3d-model/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:40:128
at Object.createDecoderModule (/Users/weipingtong/Desktop/my-3d-model/node_modules/draco3dgltf/draco_decoder_gltf_nodejs.js:40:151)
at Object.
same. using mac and getting the very same error. really hope someone actually know how to fix this
i think these come when there's a version conflict, for instance when gltfjsx was accidentally installed. could you try to remove gltfjsx from global installs, local installs. i still do not understand the cause for it.
Getting the same issue
same issue on win10