Fix the "Uncaught TypeError: destroy is not a function AJAX Check your email for updates. The $ ().modal is not a function is usually caused because scripts are loaded in the wrong order . The solution: Just download the regular (compressed or not) version of jQuery and include it in your project. The problem was: I was using the slim build of jQuery, which had some things removed, ajax being one of them. By default, this is a slim version of jquery, ( slim.jquery.js ), not the full jquery version. If you want .dialog (), make sure you check the check-box next to Dialog. One last note, if the above code does not work for you. It should do the trick. I doubt I'll have this job for much longer: I've been let go or I've left on my own terms already: I'm not working Results 1,388 votes. is not a function Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function but got: object. Therefore, we need to add an option: processd ata:false Tell jQuery not to touch my data here! Here is an example of how the error occurs. This slim version lacks some key modules, especially the ajax function. It thinks the variable username is null. TypeError: .ajax() is not a function. It looks like this does not refer to the object that was created, but to another one.. The problem was that I was passing an HTML element instead of its value, which is actually what I wanted to do (in fact in my php code I need that value as a foreign key for querying my It happens because the component is rendered before the async data arrived, you should control before to render. App.js Uncaught TypeError Now I write these code for resolve the problem: $('#sel') .empty() //empty select .append($("