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.

define is not defined at countUp.js:12

See original GitHub issue
[ X ] Bug
[ ] Feature request

CountUp.js version:

Description

Using the latest countUp.js, I see the error: define is not defined at countUp.js:12

Line 12 of countUp.js: define(["require", "exports"], function (require, exports) {

Thanks,

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
inorganikcommented, Apr 28, 2020

Good news all - CountUp is now also distributed as a UMD module and it exposes countUp as a global. You can use it like this when you include countUp.umd.js in a script tag:

var numAnim = new countUp.CountUp('myTarget', 2000);
numAnim.start()
1reaction
BenJackGillcommented, Apr 28, 2020

I had same problem.

It’s probably worth mentioning that not everyone has the same level of skill or understanding. I needed a quick solution but I had to spend the last 4 or 5 hours trying to figure this out.

I appreciate all the hard work going into this, and I tried my best to learn and make it work with JS modules as per the README but in the end I had to resort to using the 1.9.3 version.

My vote would be to make it work just like other scripts so that it’s accessible to a wider audience - but that’s just my two cents 😃

Thanks for making this regardless!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CountUp is not defined - javascript - Stack Overflow
I found a cdn and put it in my code and followed a tutorial on how to use it. Repo https://github.com/inorganik/countUp.js. CDN https://cdnjs....
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 >
Configurable React Component Wrapper around CountUp.js
In our case is_construct is false as we are not using new and the receiver, the this in the function should be set...
Read more >
How to solve "window is not defined" errors in React and Next.js
js world, window is not defined, window is only available in browsers. There are three ways to solve that: 1. First solution: typeof....
Read more >
Definitions tag - LessWrong 2.0 viewer - GreaterWrong.com
That fits great with my definition of illegibility. This case sounds like you've clarified it enough to make it legible to yourself but...
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