MaaAssistantArknights / MaaX

MAA GUI with Electron & Vue3
https://www.maa.plus
GNU Affero General Public License v3.0
373 stars 75 forks source link

dev后出现EER_REQUIRE_ESM报错 #223

Open CharloZhu opened 1 week ago

CharloZhu commented 1 week ago

安装完依赖后运行了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)