LokerL / tts-vue

🎤 微软语音合成工具,使用 Electron + Vue + ElementPlus + Vite 构建。
https://tts-doc.loker.vip/home.html
MIT License
5.81k stars 833 forks source link

希望添加多平台支持(MacOS Apple Slicon) #162

Closed stepbystepcode closed 11 months ago

stepbystepcode commented 11 months ago

Describe the problem you confuse

我使用源码编译electron应用 经过了这些步骤后:

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)

望解决

stepbystepcode commented 11 months ago

补充: 系统:Mac Mini 2023(arm架构) 芯片:Apple M2 打包:pnpm run build 如果需要帮助调试可以帮忙。

LokerL commented 11 months ago

release里有打包好的

stepbystepcode commented 11 months ago

感谢,确实看了一眼release没注意看,已解决