Fix – uncaught typeerror: $(…).select2 is not a function
Posted on: February 26, 2021 by Deven
If you are getting uncaught typeerror: $(…).select2 is not a function error, this article will help you fix the issue.
Consider the example below:
mounted() {
$('select').select2();
},
we usually get this error when Jquery is loaded twice, To see if jQuery is loaded properly, type $ in the browser console to see if it returns the appropriate code. If it does, then it is your select2 module.
You may also try checking if Script loading is in correct order like below:
1. jQuery,
2. select2,
3. your js files
Share on social media
//