Skip to content
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

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

Closed
bjornstar opened this issue Jun 10, 2021 · 6 comments · Fixed by #1538
Closed

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

bjornstar opened this issue Jun 10, 2021 · 6 comments · Fixed by #1538

Comments

@bjornstar
Copy link
Contributor

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;
       ╵              ~~~~~~~~~~
@bd82
Copy link
Member

bd82 commented Jun 10, 2021

Looks like this __esModule is only needed for compatibility with defaults exports and commonJS clients.
But that is obviously not relevant for the esm bundling, particularly as Chevrotain uses a separate exports entry point for commonjs.

@bjornstar
Copy link
Contributor Author

gen-esm-wrapper@1.1.2 has been released with a fix for this issue. It would be great to get a new release with that fix.

bjornstar added a commit to bjornstar/chevrotain that referenced this issue Jun 11, 2021
@bd82 bd82 reopened this Jun 11, 2021
@bd82
Copy link
Member

bd82 commented Jun 11, 2021

re-opening until a new version is published

@bjornstar
Copy link
Contributor Author

re-opening until a new version is published

Any idea when that might be?

@bd82 bd82 changed the title The export name "__esModule" is reserved and cannot be used esm bundle: the export name "__esModule" is reserved and cannot be used Jun 12, 2021
@bd82
Copy link
Member

bd82 commented Jun 12, 2021

9.0.2 is out on npmjs.com

@bd82 bd82 closed this as completed Jun 12, 2021
@bjornstar
Copy link
Contributor Author

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants