Skip to content

repl: display dynamic import version in error message.#48129

Merged
nodejs-github-bot merged 33 commits intonodejs:mainfrom
hemanth:main
Jun 11, 2023
Merged

repl: display dynamic import version in error message.#48129
nodejs-github-bot merged 33 commits intonodejs:mainfrom
hemanth:main

Conversation

@hemanth
Copy link
Contributor

@hemanth hemanth commented May 22, 2023

Fix for #48084

 ./out/Release/node
Welcome to Node.js v21.0.0-pre.
Type ".help" for more information.
> import {foo, bar} from 'mo';
import {foo, bar} from 'mo';
^^^^^^

Uncaught:
SyntaxError: Cannot use import statement inside the Node.js REPL, alternatively use dynamic import: const {foo,bar} = await import('mo');
image

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants