Hello, I’m currently in the process of updating the meteor version of my project from 1.0.12 to 2.12 and I’m facing some error related to the select2 library.
This is the error that is been generated when I load the form
Error: $(...).prop(...).select2 is not a function
TypeError: $(...).prop(...).select2 is not a function
at exam.js:424:12
at MethodInvoker._callback (meteor.js?hash=7dd187e6c4c7dc8731ddaf9d1d993d3c3ba5a732:1343:22)
at MethodInvoker._maybeInvokeCallback (MethodInvoker.js:52:12)
at MethodInvoker.receiveResult (MethodInvoker.js:71:10)
at Connection._livedata_result (livedata_connection.js:1655:9)
at Connection.onMessage (livedata_connection.js:1812:12)
The line that generates the error is the 424 that uses the select2 along with jquery… In the print there is the package.json and the packages that I have installed in my project.
And this is how I import those libraries:
import "/node_modules/corejs-typeahead/dist/typeahead.jquery.min.js";
import "/node_modules/select2/dist/js/select2.full.min.js";
import "/node_modules/select2/dist/css/select2.min.css";
import "/node_modules/select2-bootstrap-theme/dist/select2-bootstrap.min.css";
Thanks in advance for any help…