GLTFJSX Unexpected token '.' (react-three-fiber)

I’ve used this tool many times and it works with my current methods. Now that it has been updated it doesn’t work.

Normally I place my .gltf in my public folder and cd to the public folder. Then I used to run “npx @react-three/gltfjsx [filename.gltf]”, but now the format has changed to just “npx gltfjsx”. Even when I change the command to “npx gltfjsx [filename.gltf]” it doesn’t work. I’ve tested multiple .gltf files with the same result of an Unexpected Token ‘.’. It seems the update broke this useful command.

May be a bit faster to report it as an issue on pmndrs/gltfjsx ?

(cc @drcmda)

1 Like

Yeah that’s what I’m doing right now. thx

should be fixed. i used optional chaining foo?.bar. probably not a good idea in node. im version 14.7.0, probably has a newer chrome than yours. @react-three/gltfjsx and gltfjsx is the same package.

Fixed. Thank you! After getting spoiled with this tool it’s pretty annoying manually importing my nodes in manually.