-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
createRequireFromPath does not support directories with a trailing slash #27527
Comments
Does it really matter since that method is about to be doc-deprecated anyway (#27405)? |
@mscdex since |
This actually seems like the expected behaviour to me? |
Shouldn't |
@Fishrock123 since it is a wrapper around
|
afaik this was properly fixed by ef51cc8 |
Follow up from e5c8be2
TL;DR
createRequireFromPath('/path/to/dir')
has unexpected behavior as it is treated as a file not a directory...createRequireFromPath('/path/to/dir/')
works as expected.Seems like the only way forward would be to introduce a synchronous file / directory stat... which imho is undesirable but I totally see why this creates unexpected behavior.
/cc @BridgeAR @addaleax @devsnek
The text was updated successfully, but these errors were encountered: