I have another thread on here about this. The problem is many of your npm packages will need the npm version of jQuery and thus install it. But many meteor packages also require jQuery.
Under your .meteor/packages file if you install firstname.lastname@example.org! with the exclamation point, this tells meteor to refer to the npm version of the package and not install another version just for your meteor packages.
I was championing for something like this for underscore and other common packages that are duplicated like this, but unfortunately to my knowledge jQuery is the only one that works like this.
OK, so modifying .meteor/packages to say email@example.com! is all good.
I then set my NPM version of jQuery specifically to 3.0.0 as well, using meteor npm uninstall jquery && meteor npm install --save --save-exact firstname.lastname@example.org
I’m assuming if the NPM version is different from the meteor version, it’ll install both, so I’m just using 3.0.0. It became sad and complained when I tried to install a more recent version, as Blaze wants 3.0.0 as the maximum version, from what I understood.
That makes a lot of sense about the ‘!’ for underscore+.
No, I think setting the meteor version of jQuery to 3.0.0! makes it use whatever version is installed by npm, for better or worse. I believe it “loosens” the dependency to any meteor packages and upon running, they’ll use the npm version, which should work in most cases.
I run Meteor 2.7.1 with the latest blaze and we use jQuery 3.6.0 via npm. All runs great. I can do a bundle visualizer just to double check there’s not two jQuery’s but last time I checked there was only one.