when I try to require WOW
by one of those statements
global.WOW = require('wowjs');
var WOW = require('wowjs');
window.WOW = require('wowjs');
I receive this error
jQuery.Deferred exception: WOW is not a constructor TypeError: WOW is not a constructor
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor, but that object or variable is not a constructor.
try this one
const WOW = require('wowjs');
window.wow = new WOW.WOW({
live: false
});
window.wow.init();
the module exports an object, you need to use the WOW constructor in that object. Eg. require('wowjs').WOW
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With