Reproduction recipe here: https://github.com/worldsayshi/meteorRequireProblems
In short: I can't use require("./foobar.js")
in the imported module when I use meteor npm link ../path/to/dependency
. require seems to be confused about how to find modules by relative path.
Related issues, possibly same issue:
https://github.com/meteor/meteor/issues/2876
https://github.com/meteor/meteor/issues/7154
Made slight adjustment to example readme just now.
I am having the same issue; any require calls to a relative path in the "main" file of the linked package lead to a "module not found" error.
Thanks very much for the reproduction. Fix coming soon!
Most helpful comment
Thanks very much for the reproduction. Fix coming soon!