-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Error importing ES module with an encoded comma in the URL #40305
Labels
confirmed-bug
Issues with confirmed bugs.
esm
Issues and PRs related to the ECMAScript Modules implementation.
Comments
Thanks for the report @fasttime. Would you like to do a PR to fix it? |
targos
added
confirmed-bug
Issues with confirmed bugs.
esm
Issues and PRs related to the ECMAScript Modules implementation.
labels
Oct 4, 2021
@targos Sure. Thanks for confirming. |
aduh95
pushed a commit
to aduh95/node
that referenced
this issue
Oct 22, 2021
PR-URL: nodejs#40325 Fixes: nodejs#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
aduh95
pushed a commit
to aduh95/node
that referenced
this issue
Oct 22, 2021
PR-URL: nodejs#40325 Fixes: nodejs#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
targos
pushed a commit
that referenced
this issue
Oct 23, 2021
Fixes #40305 PR-URL: #40325 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
BethGriggs
pushed a commit
that referenced
this issue
Nov 23, 2021
Fixes #40305 PR-URL: #40325 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
richardlau
pushed a commit
that referenced
this issue
Nov 26, 2021
PR-URL: #40325 Backport-PR-URL: #40564 Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
richardlau
pushed a commit
that referenced
this issue
Nov 26, 2021
PR-URL: #40325 Backport-PR-URL: #40564 Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
richardlau
pushed a commit
that referenced
this issue
Dec 14, 2021
PR-URL: #40325 Backport-PR-URL: #40565 Fixes: #40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
abhishekumar-tyagi
pushed a commit
to abhishekumar-tyagi/node
that referenced
this issue
May 5, 2024
PR-URL: nodejs/node#40325 Fixes: nodejs/node#40305 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Zeyu Yang <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
confirmed-bug
Issues with confirmed bugs.
esm
Issues and PRs related to the ECMAScript Modules implementation.
Version
v16.10.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
or
How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior?
Should import a module named "foo,bar.mjs" located in the same folder, if present, or throw an error with code
ERR_MODULE_NOT_FOUND
.What do you see instead?
Throws:
TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module "./foo%2cbar.mjs" must not include encoded "/" or "\" characters imported from ./test.mjs
Note that there is no encoded "/" or "\" in "./foo%2cbar.mjs", just an encoded ","!
Additional information
In my understanding, this behavior results from a bug in lib/internal/modules/esm/resolve.js, where the regular expression
encodedSepRegEx
incorrectly matches an encoded slash or comma ("/" or ",") instead of a slash or backslash.The text was updated successfully, but these errors were encountered: