-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
ERR_REQUIRE_ESM failure when using unist-util-visit>=3.0.0 #18
Milestone
Comments
candrews
added a commit
to candrews/mdx-mermaid
that referenced
this issue
Dec 2, 2021
sjwall
added a commit
that referenced
this issue
Jan 8, 2022
* Set up spys instead of using mock jest.mock doesn't work work against ES6 modules, but this approach of using spys instead does. See: jestjs/jest#10025 * Export as an ES6 module instead of CommonJS * Upgrade unist-util-visit to 3.0.0 * Upgrade unist-util-visit to 4.1.0 Closes: #18 * Use `import` instead of `require` * Use ES2020 instead of ESNext It's best to use a specific version to ensure a consistent, reproducible product. Co-authored-by: Sam Wall <oss@samuelwall.co.uk>
perhaps a same issue:
|
Ygilany
added a commit
to IT4063C/IT4063C.github.io
that referenced
this issue
Aug 9, 2022
Ygilany
added a commit
to IT4063C/IT4063C.github.io
that referenced
this issue
Aug 9, 2022
This is resolved with release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
As of
unist-util-visit
version 3.0.0, ESM must be used.When using
mdx-mermaid
version 1.1.1 (the current latest release) withunist-util-visit
version 4.1.0 (the current latest release), the build fails withERR_REQUIRE_ESM
To Reproduce
Set up a simple docusaurus project with mdx-mermaid, then run
docusaurus build
Expected behavior
Build should succeed.
Screenshots
n/a
Stack trace
Tool chain used:
npm 8.0.0, node v16.11.1
Additional context
The text was updated successfully, but these errors were encountered: