Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uncaught TypeError: jQuery.event.addProp is not a function

So all of the sudden my project started getting this weird error:

VM4281 angular.js:11706 TypeError: jQuery.event.addProp is not a function
at Object.jQuery.event.fix (VM4315 jquery-migrate.js:354)
at HTMLDivElement.jQuery.event.dispatch (VM4280 jquery.js:4399)
at HTMLDivElement.elemData.handle (VM4280 jquery.js:4121)
at Object.jQuery.event.trigger (VM4280 jquery.js:4350)
at Object.e.event.trigger (jquery-migrate-1.2.1.min.js:4)
at jQuery.fn.extend.triggerHandler (VM4280 jquery.js:4907)
at jQuery.cleanData (VM4281 angular.js:1567)
at Function.cleanData (VM4299 jquery-ui.js:341)
at jQuery.fn.extend.remove (VM4280 jquery.js:5258)
at Object.leave (VM4281 angular.js:4723)

It was working fine yesterday. I checked our git repository and there wasn't any recent update to our bower.json file (last update was 21 days ago).

The stack trace indicates something inside angular/jquery. I'm flabbergasted. Any ideas?

like image 400
Wagner Danda da Silva Filho Avatar asked Dec 24 '22 04:12

Wagner Danda da Silva Filho


1 Answers

We found the problem and I'm documenting here for future reference:

There was an update in jquery-migrate from 1.4.0 to 3.0.0, which caused breakages in the code and master (3.0.0 - this requires jquery 3.0) was not compatible with the project so changed the version from master (3.0.0) to "jquery-migrate":"~1.4.0" in bower.json.

like image 182
Wagner Danda da Silva Filho Avatar answered Jan 09 '23 16:01

Wagner Danda da Silva Filho