Why is my module not present in node modules after build

I user meteor build. I untar the package and do npm install --production in the server directory. One of the modules I use on server side is always missing: geoip-lite.

It is referred to like this

mport { Meteor } from  'meteor/meteor';
import { postalcodesCollection } from  '../collections/postalcodes.js';
import geoip from "geoip-lite";

// Returns
// {
//   range: [ 1754831872, 1754832127 ],
//   country: 'US',
//   region: 'TX',
//   eu: '0',
//   timezone: 'America/Chicago',
//   city: 'Graham',
//   ll: [ 33.0951, -98.5923 ],
//   metro: 627,
//   area: 50
// }
export const ipLookup = (ip) => geoip.lookup(ip);

And it works fine if I manually install the module after npm install. But why do I have to do it for this and not the others?

This happens because NPM completely removes everything in the node_modules folder when you run npm install.

Try unpacking the tarball in another directory and then running npm install /path/to/module

That is my workaround but I don’t have to do this for ANY OTHER MODULE. To be clear. It REMOVE even the reference to the package in the bundle. So if I do npm install --production, it does not have geoip-lite. I have to explicitly npm install geoip-lite