pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.42k stars 290 forks source link

cannot run my model #205

Open xiaogua-bushigua opened 1 year ago

xiaogua-bushigua commented 1 year ago

when I run "npm exec gltfjsx@latest .\rabbitDraco.gltf -T"

an error occurs:

file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/options.js:15 filter: ([, flag]) => Object.hasOwn(flag, 'alias'), ^

TypeError: Object.hasOwn is not a function at filter (file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/options.js:15:34) at file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/options.js:42:58 at Array.filter () at validateOptions (file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/options.js:42:41) at buildOptions (file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/options.js:87:2) at meow (file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/meow/source/index.js:91:24) at file:///C:/Users/1/AppData/Local/npm-cache/_npx/d2e3f27ebeaf007c/node_modules/gltfjsx/cli.js:13:13 at ModuleJob.run (node:internal/modules/esm/module_job:175:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async Object.loadESM (node:internal/process/esm_loader:68:5)

node: 16.0.0

drcmda commented 1 year ago

it should be npx gltfjsx yourmodel.glb --transform

the model also needs to access its externals, if that's an empty gltf and the binaries aren't there it cant work