jQuery Problems

Hello,

i have a curious problem with my yii2 software. I use on different sites kartik select2 widget oder kartik gridview. On my local machine all works fine. But on the production machine i got always javascript / jquery errors like this:


jQuery.Deferred exception: $(...).find(...).size is not a function TypeError: $(...).find(...).size is not a function

or


Uncaught TypeError: $(...).find(...).size is not a function

On both machines i have doing composer update without errors. What can i do?

If you are running Composer on the prod machine, perhaps you forgot to install the Composer asset plugin (globally)?

Check the installation instructions for Yii 2 one more time. :)

it’s possible you have a newer version of jQuery on production… size() was deprecated in 1.8 and removed in 3.0 - http://api.jquery.com/size/

You are right, another old jquery-declaration was inside the asset.

Thanks for help.