question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Experiencing a ReferenceError: k is not defined (gauge.js)

See original GitHub issue

I am implementing this neat svg-gauge via the wrapper that @mattlewis92 made here

I am experiencing a ReferenceError, k is not defined when I try to run my Angular 8 app with an svg-gauge in it.

Per the console error, it seems that this is the line of code that I am battling: https://github.com/naikus/svg-gauge/blob/master/src/gauge.js#L96

Would you be able to modify this line (or I could create a PR…?),

FROM

for(k in s) {

TO

for(let k in s) {

I am hoping that this will solve my problems. If you have any other advice, it will be much appreciated.

Screenshot: image

https://angular-ssr-example.coltenkrauter.com https://github.com/coltenkrauter/angular-ssr-example

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
coltenkrautercommented, Aug 6, 2019

Thanks a lot @mattlewis92 - I can confirm, it is now working as expected. I really appreciate your helpfulness.

1reaction
naikuscommented, Aug 5, 2019

Hi @coltenkrauter Thanks for reporting this! This has been fixed in 1.0.6 version of the library in npm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jquery - gauge.js - Can't get to work - Stack Overflow
Created a jsFiddle here but i have a Uncaught TypeError: Object #<HTMLDivElement> has no method 'getContext' error in gauge.min.js line 31. – ...
Read more >
ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >
Tutorial on Creating Charts using JavaScript & HTML
An interactive tutorial on creating HTML5 JavaScript Charts using CanvasJS. Build your first chart in 5 minutes!
Read more >
gauge.js
100% native and cool looking animated JavaScript/CoffeeScript gauge. ... No dependencies (jQuery is supported, but not required); Highly configurable ...
Read more >
How to fix "Uncaught ReferenceError: x is not defined" in ...
JS Casts 04 - How to fix "Uncaught TypeError: x is not a function " in JavaScript.Visit https://javascriptcasts.com/episodes/04 for a summary ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found