GithubHelp home page GithubHelp logo

Unexpected Token '.' (react-three-fiber) about gltfjsx HOT 9 CLOSED

 avatar commented on August 22, 2024
Unexpected Token '.' (react-three-fiber)

from gltfjsx.

Comments (9)

 avatar commented on August 22, 2024

It's likely an issue within the module gltfjsx.js. Line 72 has a possible bug?

from gltfjsx.

drcmda avatar drcmda commented on August 22, 2024

no, but ¥our node version maybe cant handle optional chaining, i removed it. nice find!

from gltfjsx.

wileyknight avatar wileyknight commented on August 22, 2024

Was this issue resolved? because I am still getting this error trying to use the tool. The error is coming from animations?.length. What is the workaround for this?

PATH\node_modules\gltfjsx\src\gltfjsx.js:72
let hasAnimations = gltf.animations?.length > 0

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Module.require (internal/modules/cjs/loader.js:1026:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (PATH\node_modules\gltfjsx\src\components\App.js:12:17)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Module.module._compile (PATH\node_modules\import-jsx\index.js:45:11)

from gltfjsx.

drcmda avatar drcmda commented on August 22, 2024

https://github.com/pmndrs/gltfjsx/blob/master/src/gltfjsx.js#L72 it's fixed.

from gltfjsx.

 avatar commented on August 22, 2024

@drcmda I suggest a release? This is still present in downloads but replacing the code that was added on line 72 works great : ] thanks for the fix!

from gltfjsx.

drcmda avatar drcmda commented on August 22, 2024

oh, youre right - i was a 100% sure i did release

from gltfjsx.

 avatar commented on August 22, 2024

@drcmda I really like this project and am wondering how I could become a contributor? I have noticed some errors when creating jsx or tsx files and would definitely like to help. Also no worries it's technically fixed.

from gltfjsx.

drcmda avatar drcmda commented on August 22, 2024

you could start by making pr's. i would be glad to add more people to the team that looks out for it. there are many interesting things we can still do with it.

from gltfjsx.

 avatar commented on August 22, 2024

@drcmda alrighty will do 😄

from gltfjsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.