Uncaught Exception:
Error: Could not load the "sharp" module using the darwin-arm64 runtime
ERR_DLOPEN_FAILED: dlopen(/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/.com.lolwom.app.5iMXYA, 0x0001): Library not loaded: @rpath/libvips-cpp.42.dylib
Referenced from: <8791EE4B-BC08-3720-9DD2-BC610F2FA3E6> /private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/.com.lolwom.app.5iMXYA
Reason: tried: '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../sharp-libvips-darwin-arm64/1.0.4/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../../../@img-sharp-libvips-darwin-arm64-npm-1.0.4-d0d063884a/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../sharp-libvips-darwin-arm64/1.0.4/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/private/var/folders/9y/mkk3rkyd065g3x6jwd3pl1hc0000gn/T/../../../../../@img-sharp-libvips-darwin-arm64-npm-1.0.4-d0d063884a/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.42.dylib' (no such file), '/Users/lanyun/Documents/Github项ç®/lol-wom-electron/dist/mac-arm64/lol_wom_helper.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvips-cpp.42.dylib' (no such file), '/Users/lanyun/Documents/Github项ç®/lol-wom-electron/dist/mac-arm64/lol_wom_helper.app/Contents/Frameworks/libvips-cpp.42.dylib' (no such file)
Possible solutions:
- Ensure optional dependencies can be installed:
npm install --include=optional sharp
- Ensure your package manager supports multi-platform installation:
See https://sharp.pixelplumbing.com/install#cross-platform
- Add platform-specific dependencies:
npm install --os=darwin --cpu=arm64 sharp
- Consult the installation documentation:
See https://sharp.pixelplumbing.com/install
at Object.<anonymous> (/Users/lanyun/Documents/Github项目/lol-wom-electron/dist/mac-arm64/lol_wom_helper.app/Contents/Resources/app.asar/node_modules/sharp/lib/sharp.js:113:9)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1432:10)
at Module.load (node:internal/modules/cjs/loader:1215:32)
at Module._load (node:internal/modules/cjs/loader:1031:12)
at c._load (node:electron/js2c/node_init:2:17025)
at Module.require (node:internal/modules/cjs/loader:1240:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/Users/lanyun/Documents/Github项目/lol-wom-electron/dist/mac-arm64/lol_wom_helper.app/Contents/Resources/app.asar/node_modules/sharp/lib/constructor.js:10:1)
at Module._compile (node:internal/modules/cjs/loader:1373:14)
试图通过 "asarUnpack": ["/node_modules/sharp//*"] 来解决这个问题,但失效.
通过对mac平台关闭asar能解决这个问题,但遇到下面问题:
Uncaught Exception:
Error: ENOENT: no such file or directory, open 'game-shell-data.db'
将依赖robotjs换成@jitsi/robotjs,能解决macOS arm上的安装依赖问题 将编译好应用打开报错:
试图通过 "asarUnpack": ["/node_modules/sharp//*"] 来解决这个问题,但失效. 通过对mac平台关闭asar能解决这个问题,但遇到下面问题: Uncaught Exception: Error: ENOENT: no such file or directory, open 'game-shell-data.db'