Npm import but $('select').select2(): is not a function

I am importing jQuery and select2 from node_module installed with npm.
jQuery (and $) are globally defined on window.
I can see (in Debugger) that the code from select2.js is running with jQuery defined.

But:
jQuery('select').select2(); leads do error:
TypeError: $(...).select2 is not a function

Is there a fix?