-
-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when I try to use --transform #282
Comments
@alanmun are you able to share the .glb, and your Node.js version? |
@donmccurdy Node v21.7.3 |
Looks strongly like a case of dual package hazard. Somehow
... while
Probably there's a second copy of Or, instead of using
... and then you can use the output model in gltfjsx without |
More info about why the dual package hazard would affect these particular dependencies in donmccurdy/glTF-Transform#1594, but an upstream fix isn't likely to arrive soon. |
You were right, I do have two copies somehow. Which is the erroneous one? Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@gltf-transform/functions' imported from C:\Users\red\Repositories\horragame\node_modules\gltfjsx\src\utils\transform.js Node.js v21.7.3 When I tried deleting the first mentioned one |
I ended up trying your equivalent command, works except I get: Could not load /models/bedroom-draco.glb: THREE.GLTFLoader: WebP required by asset but unsupported. So I'll look into removing webp usage from your command. Thanks for the help! |
npx gltfjsx --transform .\frontend\assets\models\bedroom.glb
TypeError: Cannot read properties of null (reading 'createAccessor')
at compactPrimitive (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:2408:31)
at _joinLevel (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:4104:7)
at join (file:///C:/Users/red/Repositories/horragame/node_modules/@gltf-transform/functions/dist/functions.modern.js:4066:7)
at Document.transform (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/node_modules/@gltf-transform/core/dist/index.modern.js:4005:13)
at async transform (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/src/utils/transform.js:114:3)
at async run (file:///C:/Users/red/Repositories/horragame/node_modules/gltfjsx/src/gltfjsx.js:54:9)
Using without --transform works fine, but I'd really like to compress my models so they load faster while developing.
I am using:
"@react-three/drei": "^9.120.4",
"@react-three/fiber": "^8.17.10",
"@react-three/postprocessing": "^2.16.3",
"react": "18",
"react-dom": "18",
"three": "^0.171.0",
"gltfjsx": "^6.5.3",
The text was updated successfully, but these errors were encountered: