6

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

Zim
  • 296,800
  • 77
  • 616
  • 554
Ali Turki
  • 540
  • 2
  • 7
  • 16

2 Answers2

10

try this one

const WOW = require('wowjs');

window.wow = new WOW.WOW({
    live: false
});

window.wow.init();
Ashraf Farhan
  • 406
  • 5
  • 8
2

the module exports an object, you need to use the WOW constructor in that object. Eg. require('wowjs').WOW

Gabo Esquivel
  • 2,126
  • 1
  • 18
  • 18