Open NoahFD opened 2 years ago
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
(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:
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.
-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 (/Users/weipingtong/Desktop/my-3d-model/node_modules/gltfjsx/src/bin/DRACOLoader.js:2:40)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
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.