Uncaught Exception: Error: Something went wrong installing the "sharp" module
dlopen(/Applications/稳é¨è½.app/Contents/Resources/app/node_modules/sharp/build/Release/sharp-darwin-x64.node, 0x0001): Library not loaded: '/usr/local/opt/vips/lib/libvips-cpp.42.dylib' Referenced from: '/Applications/稳é¨è½.app/Contents/Resources/app/node_modules/sharp/build/Release/sharp-darwin-x64.node' Reason: tried: '/usr/local/opt/vips/lib/libvips-cpp.42.dylib' (no such file), '/usr/local/lib/libvips-cpp.42.dylib' (no such file), '/usr/lib/libvips-cpp.42.dylib' (no such file)
Possible solutions: - Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp" - Install for the current darwin-x64 runtime: "npm install --platform=darwin --arch=x64 sharp" - Consult the installation documentation: https://sharp.pixelplumbing.com/install at Object.<anonymous> (/Applications/稳部落.app/Contents/Resources/app/node_modules/sharp/lib/sharp.js:34:9) at Module._compile (node:internal/modules/cjs/loader:1118:14) at Module._extensions..js (node:internal/modules/cjs/loader:1173:10) at Module.load (node:internal/modules/cjs/loader:988:32) at Module._load (node:internal/modules/cjs/loader:829:12) at c._load (node:electron/js2c/asar_bundle:5:13343) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/Applications/稳部落.app/Contents/Resources/app/node_modules/sharp/lib/constructor.js:8:1) at Module._compile (node:internal/modules/cjs/loader:1118:14) at Module._extensions..js (node:internal/modules/cjs/loader:1173:10) at Module.load (node:internal/modules/cjs/loader:988:32) at Module._load (node:internal/modules/cjs/loader:829:12) at c._load (node:electron/js2c/asar_bundle:5:13343) at Module.require (node:internal/modules/cjs/loader:1012:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/Applications/稳部落.app/Contents/Resources/app/**node_module**
functiongetAllJsMapUri(basePath) { let pathUri = path.resolve(basePath); let jsMapUriSet = newSet(); let currentDirList = [pathUri]; let nextDirList = []; while (currentDirList.length > 0) { for (currentPath of currentDirList) { let filenameList = fs.readdirSync(currentPath); for (let filename of filenameList) { let uri = path.resolve(currentPath, filename); let fsStat = fs.statSync(uri); if (fsStat.isDirectory()) { nextDirList.push(uri); continue; } if (fsStat.isFile()) { if (filename.endsWith(".js.map")) { jsMapUriSet.add(uri); } } } } currentDirList = nextDirList; nextDirList = []; } // 得到所有js.map文件的地址 return [...jsMapUriSet.values()]; }