Skip to content

module: fix require in node repl - #30835

Closed
ZYSzys wants to merge 2 commits into
nodejs:masterfrom
zys-contrib:repl-require
Closed

ZYSzys wants to merge 2 commits into
nodejs:masterfrom
zys-contrib:repl-require

Conversation

@ZYSzys

@ZYSzys ZYSzys commented Dec 7, 2019 •

Copy link
Copy Markdown
Member

Fixes: #30808

In REPL, module.filename is null, and for relative path modules, we shouldn't look up relative modules from node_modules.

> module.filename
null
>
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Issues and PRs related to the module subsystem. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surprising require('./file') behavior when ran from REPL

5 participants