Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where do I need to be to run switchmate-ble find? #2

Open
skosow opened this issue Feb 23, 2020 · 12 comments
Open

Where do I need to be to run switchmate-ble find? #2

skosow opened this issue Feb 23, 2020 · 12 comments

Comments

@skosow
Copy link

skosow commented Feb 23, 2020

switchmate-ble: command not found

@justinokay
Copy link

Did you ever figure it out? I'm stuck on the same step.

@sudoischenny
Copy link

You need to run the command with "node switchmate-ble find"

@AMoo-Miki
Copy link
Owner

switchmate-ble should be an executable in your path. Was there any step you missed or changed during install?

@firedevel
Copy link

I get the error,What's wrong:

/usr/lib/node_modules/homebridge-switchmate-ble/lib/scanner.js:164
debug('Failed to parse', manufacturerData?.length, manufacturerData);
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/usr/lib/node_modules/homebridge-switchmate-ble/bin/cli-find.js:4:17)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

@sudoischenny
Copy link

sudoischenny commented Jan 16, 2021

What nodejs version are you running?

node -v

@firedevel
Copy link

v12.20.1

@firedevel
Copy link

I upgraded nodejs to 14.15.4 and got the error:
internal/modules/cjs/loader.js:1122
return process.dlopen(module, path.toNamespacedPath(filename));
^

Error: The module '/usr/lib/node_modules/homebridge-switchmate-ble/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 83. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/usr/lib/node_modules/homebridge-switchmate-ble/node_modules/@abandonware/bluetooth-hci-socket/lib/native.js:6:15)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)

@sudoischenny
Copy link

Reinstall noble with the instructions in the readme.

@firedevel
Copy link

npm ERR! code 128
npm ERR! Command failed: git clone --mirror -q git://github.com/AMoo-Miki/noble-device.git /root/.npm/_cacache/tmp/git-clone-4a113043/.git
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-4a113043/.git'
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-17T01_25_03_733Z-debug.log

@sudoischenny
Copy link

Mhmmm, did you try and install homebridge-switchmate, or did this occur when installing abandonware-noble?

@firedevel
Copy link

npm i -g homebridge-switchmate-ble:
npm ERR!代码128
npm错误!命令失败:git clone --mirror -q git://github.com/AMoo-Miki/noble-device.git /root/.npm/_cacache/tmp/git-clone-4a113043/.git
npm ERR!致命的:无法创建目录'/root/.npm/_cacache/tmp/git-clone-4a113043/.git'npm
ERR!

npm ERR!可以在以下位置找到该运行的完整日志:
npm ERR!/root/.npm/_logs/2021-01-17T01_25_03_733Z-debug.log

@AMoo-Miki
Copy link
Owner

@Hi-hass your node installation has a problem. I am not a fan but a quick solution would be to do sudo npm i -g homebridge-switchmate-ble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants