WOW is not a constructor

元气小坏坏 提交于 2020-08-02 08:09:49

问题


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


回答1:


try this one

const WOW = require('wowjs');

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

window.wow.init();



回答2:


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



来源:https://stackoverflow.com/questions/43392341/wow-is-not-a-constructor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!