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

ERR_REQUIRE_ESM error when build with esm module. #601

Closed
3 tasks done
dewfall123 opened this issue Apr 12, 2022 · 2 comments
Closed
3 tasks done

ERR_REQUIRE_ESM error when build with esm module. #601

dewfall123 opened this issue Apr 12, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@dewfall123
Copy link
Contributor

Describe the bug

import a esm module, and run docs:build

✖ rendering pages...
build error:
 Error [ERR_REQUIRE_ESM]: require() of ES Module...

Reproduction

https://github.com/dewfall123/vitepress-issues-2.git

run command yarn docs:build

Expected behavior

no error.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
    Memory: 6.34 GB / 15.93 GB
  Binaries:
    Node: 16.8.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 7.21.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 100.0.4896.75
    Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.39)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vitepress: ^0.22.3 => 0.22.3

Additional context

same as #592

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@dewfall123 dewfall123 added the bug: pending triage Maybe a bug, waiting for confirmation label Apr 12, 2022
@yl-199807
Copy link

same,have you solved it?

@kiaking kiaking added enhancement New feature or request build Related to the build system and removed bug: pending triage Maybe a bug, waiting for confirmation labels May 24, 2022
@kiaking kiaking added this to the v1.0.0 milestone May 27, 2022
@brc-dd
Copy link
Member

brc-dd commented May 28, 2022

Duplicate of #476

@kiaking kiaking added duplicate This issue or pull request already exists and removed enhancement New feature or request build Related to the build system labels May 29, 2022
@kiaking kiaking removed this from the v1.0.0 milestone May 29, 2022
@kiaking kiaking closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants