pnpm install @element-plus/icons-vue
pnpm install follow-redirects
pnpm install form-data
pnpm i combined-stream
pnpm i delayed-stream
pnpm i mime-types
pnpm i mime-db
pnpm i asynckit
pnpm i conf
仍然会报错:
Uncaught Exception:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/node_modules/conf/dist/source/index.js from /Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/node_modules/electron-store/index.js not supported.
Instead change the require of /Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/node_modules/conf/dist/source/index.js in /Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/node_modules/electron-store/index.js to a dynamic import() which is available in all CommonJS modules.
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Object.<anonymous> (/Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/node_modules/electron-store/index.js:4:14)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.<anonymous> (/Users/stepbystep/tts-vue/release/1.9.15/mac-arm64/tts-vue.app/Contents/Resources/app.asar/dist/electron/main/index.js:32:1984)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Object.<anonymous> (node:electron/js2c/browser_init:185:3104)
at ./lib/browser/init.ts (node:electron/js2c/browser_init:185:3308)
at __webpack_require__ (node:electron/js2c/browser_init:1:128)
at node:electron/js2c/browser_init:1:1200
at node:electron/js2c/browser_init:1:1267
at c._load (node:electron/js2c/asar_bundle:5:13343)
Describe the problem you confuse
我使用源码编译electron应用 经过了这些步骤后:
仍然会报错:
望解决