question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

esm bundle: the export name "__esModule" is reserved and cannot be used

See original GitHub issue

We’re having trouble importing chevrotain using esbuild v0.12.7:

We get the following error:

> node_modules/chevrotain/lib_esm/api_esm.mjs:28:13: error: The export name "__esModule" is reserved and cannot be used (it's needed as an export marker when converting ES module syntax to CommonJS)
    28 │ export const __esModule = mod.__esModule;
       ╵              ~~~~~~~~~~

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bjornstarcommented, Jun 13, 2021

Thanks a bunch!

0reactions
bd82commented, Jun 12, 2021

9.0.2 is out on npmjs.com

Read more comments on GitHub >

github_iconTop Results From Across the Web

The export name "__esModule" is reserved and cannot be used
Recently, I've been attempting to bundle modules from jspm.io (via a ... The export name "__esModule" is reserved and cannot be used #1591....
Read more >
16. Modules - Exploring JS
You can't use reserved words (such as default and new ) as variable names, but you can use them as names for exports...
Read more >
JavaScript modules - MDN Web Docs
The first thing you do to get access to module features is export them. This is done using the export statement. You can...
Read more >
Typescript ReferenceError: exports is not defined
I was hoping to use module along with older code and it seems like that is not possible. This at least allow me...
Read more >
Using Node.js ES modules and top-level await in AWS Lambda
The ES module uses top-level await to retrieve the parameter. The CommonJS function awaits the parameter retrieval in the handler. Before ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found