{"action":"closed","issue":{"url":"https://api.github.com/repos/lovell/sharp/issues/1419","repository_url":"https://api.github.com/repos/lovell/sharp","labels_url":"https://api.github.com/repos/lovell/sharp/issues/1419/labels{/name}","comments_url":"https://api.github.com/repos/lovell/sharp/issues/1419/comments","events_url":"https://api.github.com/repos/lovell/sharp/issues/1419/events","html_url":"https://github.com/lovell/sharp/issues/1419","id":371897263,"node_id":"MDU6SXNzdWUzNzE4OTcyNjM=","number":1419,"title":"Using sharp with canvas and electron-builder, runtime can't find dylibs (osx)","user":{"login":"awbacker","id":103330,"node_id":"MDQ6VXNlcjEwMzMzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/103330?v=4","gravatar_id":"","url":"https://api.github.com/users/awbacker","html_url":"https://github.com/awbacker","followers_url":"https://api.github.com/users/awbacker/followers","following_url":"https://api.github.com/users/awbacker/following{/other_user}","gists_url":"https://api.github.com/users/awbacker/gists{/gist_id}","starred_url":"https://api.github.com/users/awbacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awbacker/subscriptions","organizations_url":"https://api.github.com/users/awbacker/orgs","repos_url":"https://api.github.com/users/awbacker/repos","events_url":"https://api.github.com/users/awbacker/events{/privacy}","received_events_url":"https://api.github.com/users/awbacker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-19T10:23:26Z","updated_at":"2018-10-23T04:36:12Z","closed_at":"2018-10-23T04:36:12Z","author_association":"NONE","body":"```\r\n   sharp@0.20.5\r\n   electron-builder@20.14.7\r\n```\r\n\r\nCan anyone provide me with some pointers on how to use `sharp` with electron-builder on os-x, since I am **sure** I am doing something wrong here.  I am having 2 issues when loading the `.dylib` files that always show up when the app is opened on another machine:\r\n\r\n* Incompatible Version (see the error below)\r\n  * Version in app.asar is 49, but version found is 42 (etc)\r\n* File Not Found (`/opt/local/bin/libpixman-1.0.dylib`, etc)\r\n\r\nI can't quite tell whats going on.  Sometimes it seems to find the dylib but its the wrong version (in the app.asar), which implies it used my local version as the version# it wants.  In other cases it appears to not find the dylib at all and complains with a \"file not found\", even though it _is_ in the app.asar.   \r\n\r\nHere are the steps I am following, and my configuration:\r\n\r\n* My machine has macports installed, with many of these libraries also installed/used\r\n* OS-X 10.13.6 \r\n* I am building with yarn, with basically this sequence of commands\r\n  * yarn install\r\n  * node postinstall\r\n  * ng build -c productoin\r\n  * npx electron-builder install-app-deps\r\n  * npx electron-builder build --mac \r\n* App is packaged as dmg\r\n  * app.asar contains the libs \r\n  * app.asar.unpacked/ also contains the libs  (both in node_modules/sharp/vendor/lib)\r\n\r\nAlso:\r\n\r\n* I have cleared LIBRARY_PATH and CPLUS_INCLUDE_PATH\r\n* I do not have DYLD_FALLBACK\r\n* I expect to see \"load @rpath/libping16.16.dylib\" but I see \"/opt/local/lib\" :(\r\n* I do not have a DYLD_FALLBACK_... setting in my environment\r\n\r\n```\r\ndlopen(/var/folders/2_/{rand}/T/.myapp.CZDwaU, 1): \r\n  Library not loaded: /opt/local/lib/libpng16.16.dylib  (this file does _not_ exist!)\r\n  Referenced from: /var/folders/2_/{rand}/T/.product.CZDwaU\r\n  Reason: Incompatible library version: .product.CZDwaU requires version 52.0.0 or later, but libpng16.16.dylib provides version 49.0.0 \r\n        ^^^^ it found a file, the one in the app.asar (or app.asar.unpacked)\r\n    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20)\r\n    at Object.Module._extensions..node (module.js:671:18)\r\n    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:186:18)\r\n    at Module.load (module.js:561:32)\r\n    at tryModuleLoad (module.js:504:12)\r\n    at Function.Module._load (module.js:496:3)\r\n    at Module.require (module.js:586:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (/Applications/product.app/Contents/Resources/app.asar/node_modules/canvas/lib/bindings.js:3:18)\r\n    at Object.<anonymous> (/Applications/product.app/Contents/Resources/app.asar/node_modules/canvas/lib/bindings.js:5:3)\r\n```\r\n\r\nI filed an issue in electron-builder, but I now think that _may_ be the wrong place (https://github.com/electron-userland/electron-builder/issues/3395)"}}
{"actor":{"display_login":"awbacker"}}