-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Subpath imports (require "#foo") do not work in REPL #43410
Labels
repl
Issues and PRs related to the REPL subsystem.
Comments
rayw000
added a commit
to rayw000/node
that referenced
this issue
Jun 16, 2022
rayw000
added a commit
to rayw000/node
that referenced
this issue
Jun 16, 2022
nodejs-github-bot
pushed a commit
that referenced
this issue
Jun 30, 2022
PR-URL: #43450 Fixes: #43410 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos
pushed a commit
that referenced
this issue
Jul 12, 2022
PR-URL: #43450 Fixes: #43410 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
targos
pushed a commit
that referenced
this issue
Jul 31, 2022
PR-URL: #43450 Fixes: #43410 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
guangwong
pushed a commit
to noslate-project/node
that referenced
this issue
Oct 10, 2022
PR-URL: nodejs/node#43450 Fixes: nodejs/node#43410 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v16.15.1
Platform
Linux bob 5.10.0-12-amd64 #1 SMP Debian 5.10.103-1 (2022-03-07) x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
Add a subpath import to
package.json
, e.g.or
Then try to import it into the REPL (launched from within your package's directory or subdirectory thereof) using
require("#foo")
or by passing the-r '#foo'
option to node.How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
I'd expect
require()
in the REPL to behave as if it was invoked from a source file located in the current directory. This is obviously the most convenient behaviour for debugging, and it's how it works for every other kind of module specifier (including relative paths and exported subpaths of the package).What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: