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

dev后出现EER_REQUIRE_ESM报错 #223

Open
CharloZhu opened this issue Nov 20, 2024 · 0 comments
Open

dev后出现EER_REQUIRE_ESM报错 #223

CharloZhu opened this issue Nov 20, 2024 · 0 comments
Labels
question Further information is requested

Comments

@CharloZhu
Copy link

CharloZhu commented Nov 20, 2024

安装完依赖后运行了yarn dev之后就出现了以下问题,请问应该怎么修复

Error [ERR_REQUIRE_ESM]: require() of ES Module D:\MaaX-dev\node_modules\execa\index.js from D:\MaaX-dev\dist\main\index-9bde2a7c.js not supported.
Instead change the require of index.js in D:\MaaX-dev\dist\main\index-9bde2a7c.js to a dynamic import() which is available in all CommonJS modules.
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Object.<anonymous> (D:\MaaX-dev\dist\main\index-9bde2a7c.js:42:1)
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at Object.<anonymous> (D:\MaaX-dev\dist\main\index.cjs:2:1)
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at loadApplicationPackage (D:\MaaX-dev\node_modules\electron\dist\resources\default_app.asar\main.js:121:16)
    at Object.<anonymous> (D:\MaaX-dev\node_modules\electron\dist\resources\default_app.asar\main.js:233:9)
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
    at node:electron/js2c/browser_init:2:122709
    at node:electron/js2c/browser_init:2:122912
    at node:electron/js2c/browser_init:2:122916
    at Function._load (node:electron/js2c/asar_bundle:2:13327)
@CharloZhu CharloZhu added the question Further information is requested label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant