-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
Better error message for using static import in repl #33576
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
Comments
Welcome to Node.js v14.3.0.
Type ".help" for more information.
> import * as ns from './foo.mjs';
import * as ns from './foo.mjs';
^^^^^^
Uncaught SyntaxError: Cannot use import statement outside a module Linking #32935 to help keep track of this story. |
Fwiw I almost have a poc done for this |
MylesBorins
added a commit
to MylesBorins/node
that referenced
this issue
Jul 23, 2020
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: nodejs#33576
codebytere
pushed a commit
that referenced
this issue
Aug 6, 2020
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588 Fixes: #33576 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Aug 11, 2020
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588 Fixes: #33576 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
added a commit
that referenced
this issue
Nov 3, 2020
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588 Fixes: #33576 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
added a commit
that referenced
this issue
Nov 16, 2020
Currently the error is rather ambiguous and does not inform folks that static import is not supported in the repl. This overrides the default error message with one that is more informative. Closes: #33576 PR-URL: #33588 Fixes: #33576 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We don't support using static import in the repl, we should give a more meaningful error message
The text was updated successfully, but these errors were encountered: