I have an application that uses the node twit module that is available via
npm install twit
I deployed the node module locally from .m
As of Meteor 6.0, now we need to use Npm.require() instead. Additionally, we need to declare the module as global variables, since Meteor now has file-level scope.
var path = Npm.require('path');
var fs = Npm.require('fs');
var base = path.resolve('.');
var isBundle = fs.existsSync(base + '/bundle');
var modulePath = base + (isBundle ? '/bundle/static' : '/public') + '/node_modules';
MODULE_NAME = Npm.require(modulePath + '/MODULE_NAME'); // NOTE, this is going to be a global variable