tweakpane / use-tweaks

🎛️ Tweak React components with Tweakpane
https://codesandbox.io/s/use-tweaks-example-58e02
MIT License
766 stars 22 forks source link

Uncaught TypeError: import_tweakpane.default is not a constructor #51

Open justin-hackin opened 1 year ago

justin-hackin commented 1 year ago

This library throws an uncaught exception as in the title. The symbol Tweakpane is undefined when attempting to call this constructor. I looked a tweakpane module and it doesn't seem to export a default. I checked to make sure the peerDeps match. I reproduced this issue in a couple TS projects. I'm not providing a reproduction because I'm not sure if this is maintained given there are several stale pending PRs . Intent here is to warn other developers.

justin-hackin commented 1 year ago

Oh, it's easy to reproduce with codesandbox: https://codesandbox.io/s/use-tweaks-example-forked-blovu3?file=/package.json

justin-hackin commented 1 year ago

I see in the current version 0.3.2-alpha.0 there is a fix. However, that's not the version that got installed when I installed the package without a version spec recently.

ahalp0217 commented 1 year ago

Thank you! Installing that version fixed it for me.