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

Gauge is not defined #63

Open
patson12 opened this issue May 27, 2022 · 4 comments
Open

Gauge is not defined #63

patson12 opened this issue May 27, 2022 · 4 comments

Comments

@patson12
Copy link

i am getting error while working with electron js..

index.js:224 Uncaught ReferenceError: Gauge is not defined

@naikus
Copy link
Owner

naikus commented Jun 2, 2022

Hi @patson12 can you share a repo or some starter code?

@moalamri
Copy link

@naikus I'm guessing it is because svg-gauge is not a module therefore there's no default exporter.
I wish the codebase could be converted to ES6+ so modifications could be easier. I'm still learning JS, so I couldn't really digest the codebase to make it ES6 for easier IDE integration.

Is it possible to make it ES6+ with TS support? If so then I'm willing to make TS declaration interface for svg-gauge :)

@naikus
Copy link
Owner

naikus commented Jul 3, 2022

@moalamri svg-gauge is an es module and I've used it in my project via require("svg-gauge") and
import gauge from "svg-gauge"

@moalamri
Copy link

moalamri commented Jul 3, 2022

I'm sorry I didn't notice the ts declaration interface svg-gauge.d.ts

It's because I wanted to change few things, but I didn't clone the whole package (only src/index.js) that's why I was getting not a module error.

Anyways I wish if the source is more human readable 😅 maybe it's only difficult for me. Since you have better experience in JS, is there a way to have one-click solution to convert between JS versions?

Thanks

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

3 participants