Iāve been wondering the same thing. From various research Iāve done it appears meteor does not support local node modules. If anyone has been able to get local node modules to work, please share the wealth? Or if Meteor could confirm the intent of not allowing local node modules. Please
Basically local modules donāt work b/c, there is a line in the build script that checks whether the package returns a result from the npm repository.
/meteor/tools/isobuild/meteor-npm.js which is part of the meteor build process has the following function
var installNpmModule = function (name, version, dir) { ... }
Within this function the buid runs a ānpm installā command based on a meteor copy of npm. This will return an error when the npm module returns a 404 from the public npm repo.
See
Iāve thought of forking meteor to override this behavior unfortunately maintaining a fork is a little too much overhead for me and the current plan is to meteor-ize the node module in question.
I figured it wasnāt possible. In my case, I was trying to debug the prerender-node npm module so on the authors suggestion, I cloned the function and overrode it, putting in a few logging messages to see what it was actually doing.
I havenāt touched this in a while but from what I recall you need to restart Meteor to get it reload any changes, since no directory watching on a URL. Donāt recall if I tried to do a straight path, but a file url definitely works.
For within the project / for direct imports, Iāve been copying the directory over on changes because of iirc a symlink issue. I think I avoided npm link because I didnāt want a global install. Iāll check it out for you if these donāt work when I have a chance.
Thanks @dr.dimitru for the like Will take this opportunity to ask you confirm if this still works? Because last time I tried it didnāt, but I didnāt look into it in depth.