I know this is an old topic but something important I dealt with this week… if you decide to use the NPM version of some packages by doing:
meteor npm install moment underscore --save
And you use certain Meteor packages that haven’t been modernized like
tap:i18n, even some native Meteor packages like
mdg:meteor-apm-agent they will still have dependencies on the Meteor/atmosphere versions of
So if you install the NPM version for general usage in your app, you’ll wind up with two versions in your client bundle. The NPM version you chose and installed and the Meteor/atmosphere version required by all those packages.
It’s best to do a
meteor list --tree and see if your packages depend on the Meteor/atmosphere
moment (you can also just look at your
versions file and see if those are listed). If so, I would recommend using the Meteor/atmosphere version of those common packages so you only have one version bundled to your client. It’s kinda backwards but it’s the only way to not ship double packages (unless you fork packages and start doing some hot-rodding).
Also, if you installed an NPM package that depends on
meteor npm ls to check) then you’re screwed. You’ll have to ship two versions. That is until the Meteor
underscore package gets updated like the
jquery package to reference the NPM version of the package and complain in the console if it’s not installed.