Which version of NPM does Meteor use when adding packages?


I’ve recently run into an issue with Windows. I installed a package from Atmosphere, and it has a large number of nested dependencies (lots of node_modules within node_modules). This breaks the build (among other things) because Windows only supports 260 characters in a file path. This has been a common issue among Windows users for quite some time, apparently.

This has been rectified in npm 3. The new npm3 installer will search through all dependencies and flatten the node_modules folder. I have npm 3.3 installed an in my PATH, but Meteor does not seem to use it. When I add a package, it shows up with nested deps in node_modules. If I delete the node_modules folder and run npm install from the command line, npm3 kicks in and installs everything in a flat structure.

Is there any way to force Meteor to use npm3, or am I doing something wrong?


Hi eterps, did you ever answer this?


Meteor includes packaged versions of node and npm. The version of npm used will be compatible with the version of node. You can see what versions are being used with

meteor node -v
meteor npm -v

Meteor 1.4 will use version 4 of node, but should also work with version 6, which means you could use version 3 of npm. Meteor 1.4 RC0 is available now, so you could try this.