clobberos / xpc-connect

Mac connection bindings for node.js
https://npmjs.com/package/xpc-connect
MIT License
15 stars 18 forks source link

Error: Could not locate the bindings file. #58

Open ivanisko opened 2 years ago

ivanisko commented 2 years ago

Hi jongear,

Im try to run xpc-connect with electron app and If I run "npm start" I get an error, see below.

Thank you for your help, Jan

I am running with: Node v12.14.0 NPM: 6.13.4 MacOS Monterey

App threw an error during load
Error: Could not locate the bindings file. Tried:
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/build/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/build/Debug/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/build/Release/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/out/Debug/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/Debug/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/out/Release/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/Release/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/build/default/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/compiled/16.14.2/darwin/x64/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/addon-build/release/install-root/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/addon-build/debug/install-root/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/addon-build/default/install-root/xpc-connect.node
 → /Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/lib/binding/node-v106-darwin-x64/xpc-connect.node
    at bindings (/Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/node_modules/bindings/bindings.js:126:9)
    at Object.<anonymous> (/Users/ivanisko/Projects/electron-quick-start/node_modules/xpc-connect/index.js:3:34)
    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> (/Users/ivanisko/Projects/electron-quick-start/main.js:4:20)
jongear commented 1 year ago

I released a 3.0.0 that should resolve this. let me know if you have any issues https://www.npmjs.com/package/xpc-connect/v/3.0.0

jannemecek commented 1 year ago

I'm still seeing this issue on 3.0.0

Node v18.16.0 NPM: 9.5.1 macOS Ventura 13.4.1

edit: This was just me not having the .node files in the correct locations. 🤦🏻