TIME is not defined in React TypeScript application

I have a React TypeScript Electron app created with Vite. Works fine for most components but when I add a button (very simple button - nothing fancy) I get below error.

new Button(200,60,"CLICK").center().tap(()=>{ });

react-dom_client.js?v=9698838a:16659 Uncaught ReferenceError: TIME is not defined
at new zim2.Button (zimjs.js?v=9698838a:22811:54)

image

And when I debug the buggy line I see this.

I need to add below to my application as a workaround but I believe this should already come with the package.

globalThis.TIME = "seconds"

Thanks @ustagames - this has been fixed and patched in ZIM 016 and updated in NPM to ZIM 16.0.2 - cheers. Let us know if that solves the issue.

1 Like

Thanks for the quick fix. I just tried with the new version and it works great.

1 Like