Skip to content
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

Wrong root module in REPL #27575

Closed
jdalton opened this issue May 6, 2019 · 2 comments
Closed

Wrong root module in REPL #27575

jdalton opened this issue May 6, 2019 · 2 comments
Labels
module Issues and PRs related to the module subsystem. repl Issues and PRs related to the REPL subsystem.

Comments

@jdalton
Copy link
Member

jdalton commented May 6, 2019

In the Node v12.0+ REPL

> module.id // [eval] instead of <repl>
@Trott Trott added module Issues and PRs related to the module subsystem. repl Issues and PRs related to the REPL subsystem. labels May 6, 2019
addaleax added a commit to addaleax/node that referenced this issue May 6, 2019
`getOptionValue('--eval')` always returns a string, so it is never
loose-equal to `null`. Running eval makes some modifications to the
global object, including setting `module` to a different value, which
we want to avoid if possible.

Refs: nodejs#27278
Fixes: nodejs#27575
@addaleax
Copy link
Member

addaleax commented May 6, 2019

#27587 should resolve this.

@jdalton
Copy link
Member Author

jdalton commented May 6, 2019

Rock! Thank you @addaleax!

targos pushed a commit that referenced this issue May 13, 2019
PR-URL: #27587
Fixes: #27575
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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 a pull request may close this issue.

3 participants