module: better error for named exports from cjs by MylesBorins · Pull Request #33256 · nodejs/node

@nodejs-github-bot added the esm

Issues and PRs related to the ECMAScript Modules implementation.

label

May 5, 2020

mathiasbynens

ljharb

addaleax

devsnek

addaleax

ljharb

ljharb

GeoffreyBooth

GeoffreyBooth

ljharb

ljharb

MylesBorins

MylesBorins

addaleax

GeoffreyBooth

ljharb

targos

@MylesBorins

We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

MylesBorins added a commit that referenced this pull request

May 8, 2020
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

PR-URL: #33256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

codebytere pushed a commit that referenced this pull request

May 11, 2020
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

PR-URL: #33256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>

codebytere pushed a commit that referenced this pull request

Jun 7, 2020
We do not support importing named exports from a CJS module.
This change decorates the error message for missing named exports in
the case where the module being imported is expected to be CJS by the
ESM loader.

Signed-off-by: Myles Borins <myles.borins@gmail.com>

PR-URL: #33256
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>