Skip to content
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

TypeError: Class constructor Object3D cannot be invoked without 'new' #48

Open
dataexcess opened this issue Jan 23, 2023 · 1 comment
Open

Comments

@dataexcess
Copy link

Trying to integrate this beautiful package in my project but it is not working.

I get this error:

Text2D.js:24 Uncaught (in promise) TypeError: Class constructor Object3D cannot be invoked without 'new'
    at SpriteText2D2.Text2D2 [as constructor] (Text2D.js:24:28)
    at new SpriteText2D2 (SpriteText2D.js:21:42)
    at Proxy.created (TextSprite.ts:25:5)
    at callWithErrorHandling (runtime-core.esm-bundler.js:157:36)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:176:21)
    at callHook (runtime-core.esm-bundler.js:3590:5)
    at applyOptions (runtime-core.esm-bundler.js:3492:9)
    at finishComponentSetup (runtime-core.esm-bundler.js:7368:9)
    at handleSetupResult (runtime-core.esm-bundler.js:7312:5)

After googling a bit I believe it is because of an inconsistency in three.js versions of the package and the project's code, and the way es6 modules are written.
My version is: "three": "^0.138.3".

Are you planning on updating the three.js dependency in this package? How can I circumvent this issue? Any help much appreciated. Thank you!

@surdu
Copy link

surdu commented Dec 30, 2023

I'm guessing that PR #47 is addressing this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants