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.

[Error] this.validateValue is not a function

See original GitHub issue
[ ] Error

CountUp.js version: ^2.0.3

Description

var countUpModule = require('countup.js');
window.onload = function() {
    countUpModule.CountUp('reward', 2000).start();
}

Above code is in app.js bundled with webpack gives following error:

Uncaught TypeError: this.validateValue is not a function
    at Object.t [as CountUp] (countUp.min.js?1a23:1)
    at window.onload (app.js?6d40:29)

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
inorganikcommented, Mar 14, 2019

Oh boy. Well big time facepalm guys. 😂 I forgot to put the new in example usage. This fixes it:

window.onload = function () {
  var countUp = new countUpModule.CountUp('countup', 2000);
  countUp.start();
}

Sorry about that. @Log1x thank you for the code, it helped me discover the error. FYI with yarn you can do yarn && yarn build. Also I updated the README.

1reaction
inorganikcommented, Mar 14, 2019

FYI, if you upgrade to 2.0.4, it’s now an ES6 module. Then it’s simply:

import { CountUp } from 'countup.js';

var countUp = new CountUp('countup', 2000);

If you want to stick with commonjs, you can lock in at v2.0.3.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: validation is not a function in react.js - Stack Overflow
i'm trying to validate my form but always get the same error, this the code of the form:
Read more >
validateValue(_:forKey:) | Apple Developer Documentation
Throws an error when the value specified by a given pointer is not valid or can't be made valid for the property identified...
Read more >
Jquery validation plugin - TypeError validate is not a function
validate is not a function" jQuery error occurs when the jQuery validation plugin is not loaded or the jQuery-related scripts are loaded in ......
Read more >
How to Add Extra Information to Errors in Go - DigitalOcean
The validateValue function from the program takes a number and then returns an error based on whether it was determined to be a...
Read more >
Field.js
Note this only applies to fields that are rendered, not those which are built via ... by overriding this validateValue : function(value){ return...
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