DashboardCode/BsMultiSelect

Update with 0.2.22 and got error

Noido opened this issue · 2 comments

Noido commented

Uncaught TypeError: $(...).bsMultiSelect is not a function
When i use import '@dashboardcode/bsmultiselect/dist/js/BsMultiSelect.js';

and it was working before you update in 0.2.22

thanks for your help

Check your bundle - find jquery or bsMultiSelect loading code, there should be wrong pathes isn't it?

Try to remove node_modules and package-lock.json and run node install.

This should help you but I need to say that I do not fully understand how webpack/node calculate all dependencies and that means I'm not sure that BsMultiSelect's package.json contains everything that 3PP component should contain (I just follow Bootstrap team decisions). If smb understand why webpack sometimes create absurdist imports - please give me a direction how to increase the stability.

P.S. May be this is because I describe ref to jquery in dependencies section "jquery": "^3.4.0", when Bootstrap team ref jQuery in devDependencies section. Probably I will do the same in next releases.

Noido commented

I have update Jquery in 3.4 and it works now

Thanks