-
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
REPL Await invalidates const
#17669
Comments
Known issue. See #15566:
The RFC at the end is still active! |
working on fix in https://github.com/bmeck/node/tree/env-record-repl-await , also fixes some other bugs |
I'm unable to replicate this. Any chance this never went out in a release without a subsequent fix? Should this be closed? Or am I just testing wrong somehow? |
Ah, never mind, I see I need to use the |
@Trott is the $ node --experimental-modules --experimental-repl-await src/login.js
(node:484) ExperimentalWarning: The ESM module loader is experimental.
file:///opt/src/login.js:8
const browser = await puppeteer.launch({
^^^^^
SyntaxError: Unexpected reserved word
at Loader.moduleStrategy (internal/modules/esm/translators.js:84:18)
at async link (internal/modules/esm/module_job.js:36:21) |
|
Oh so there's no way to have top level-await in a script now, correct? |
Fixes: nodejs#17669 Signed-off-by: James M Snell <jasnell@gmail.com>
The REPL makes
const
variables not const ifawait
appears in the input:The text was updated successfully, but these errors were encountered: