这个我有搜索试过可以打包成功,但是打出来的arm64包在M1芯片电脑上打开会有异常:
Uncaught Exception:
Error: dlopen(/Applications/ç¾å¾äºä¿®beta.app/Contents/Resources/app/node_modules/ref-napi/build/Release/binding.node, 1): no suitable image found. Did find:
/Applications/ç¾å¾äºä¿®beta.app/Contents/Resources/app/node_modules/ref-napi/build/Release/binding.node: mach-o, but wrong architecture
/Applications/ç¾å¾äºä¿®beta.app/Contents/Resources/app/node_modules/ref-napi/build/Release/binding.node: mach-o, but wrong architecture
at process.func [as dlopen] (electron/js2c/asar_bundle.js:5:1812)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203:18)
at Object.func [as .node] (electron/js2c/asar_bundle.js:5:1812)
at Module.load (internal/modules/cjs/loader.js:992:32)
at Module._load (internal/modules/cjs/loader.js:885:14)
at Function.f._load (electron/js2c/asar_bundle.js:5:12633)
at Module.require (internal/modules/cjs/loader.js:1032:19)
at require (internal/modules/cjs/helpers.js:72:18)
at load (/Applications/mtyx.app/Contents/Resources/app/node_modules/node-gyp-build/index.js:21:10)
at Object.<anonymous> (/Applications/mtyx.app/Contents/Resources/app/node_modules/ref-napi/lib/ref.js:8:53)