-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
- Version: v11.11.0
- Platform: Linux bb-laptop 5.0.4-arch1-1-ARCH deps: update openssl to 1.0.1j #1 SMP PREEMPT Sat Mar 23 21:00:33 UTC 2019 x86_64 GNU/Linux
- Subsystem: module
Actual behavior:
require
ing a non-existing file throws a MODULE_NOT_FOUND
error, creating the file afterwards and trying to require
again still throws.
Expected behavior:
The second call to require
should resolve to the actual file content.
Try the following three lines in a REPL (Node v11.10.1 vs Node v11.11.0):
require('./non-existent.json');
require('fs').writeFileSync('./non-existent.json', '1');
require('./non-existent.json');
It seems like the bug was introduced with this commit: d94f4c23fe - I built Node.js with this commit and with its parent commit and was able to observe the above mentioned behavior.
thetutlage
Metadata
Metadata
Assignees
Labels
moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.