Meteor add vs npm install

So what is the difference between

meter add vs npm install?

2 Likes

See the Using Packages section of the Guide for a complete breakdown of the two options.

The difference is that meteor add is bringing packages down from Meteor’s package server (Troposphere) and installing it for you via their mechanisms.

Npm install is grabbing packages from the npm ecosystem and installing it as a standard node modules, much like the rest of the node world operates.

2 Likes

Hi Josh

So

npm install --save-dev webpack 

which modifies the root package.json

vs

meteor add webpack:webpack 

which modifies the .meteor/packages file

is the same? Thanks

2 Likes

No, they aren’t the same thing.

The npm install will grab the files that are added directly to npm by the webpack team. The meteor add call will grab the webpack files that are built with a wrapper package to get it up on the Meteor package server.

My suggestion is to use npm install as much as you can because Meteor 1.5 will see meteor libraries added to NPM and I have a feeling that the Meteor package server infrastructure will be deprecated after that.

3 Likes