You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
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.
Follow-up to af51b81, which fixed#8005 by copying symlinks to external
directories as directories rather than trying to preserve the symlinks.
Issue #10177 revealed a flaw in this strategy: the filter function that we
use to strip development npm packages always rejects external paths, even
if the original symlink was found in a valid production npm package, and
thus its contents should be included in the production bundle.
In the process of fixing this problem, I realized that the only important
part of af51b81 was this code:
// Update fileStatus to match the actual file rather than the
// symbolic link, thus forcing the file to be copied below.
fileStatus = optimisticLStatOrNull(externalPath);
and the code for manipulating thisAbsFrom and _currentRealRootDirectory
could be removed.
Reproduction recipe here: https://github.com/worldsayshi/meteorRequireProblems
In short: I can't use
require("./foobar.js")
in the imported module when I usemeteor npm link ../path/to/dependency
. require seems to be confused about how to find modules by relative path.Related issues, possibly same issue:
#2876
#7154
The text was updated successfully, but these errors were encountered: