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

Bug: #163

Closed
frimar75 opened this issue Dec 27, 2021 · 3 comments
Closed

Bug: #163

frimar75 opened this issue Dec 27, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@frimar75
Copy link

Describe The Bug

Doesn't update

To Reproduce

sudo -E -n npm install -g @switchbot/homebridge-switchbot@latest

Expected behavior

successful installation

Relevant log output

pi@homebridge:~ $ sudo -E -n npm install -g @switchbot/homebridge-switchbot@latest
npm ERR! code 1
npm ERR! path /usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Verzeichnis „/usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build“ wird betreten
npm ERR!   SOLINK_MODULE(target) Release/obj.target/noble.node
npm ERR! make: Verzeichnis „/usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build“ wird verlassen
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | arm
npm ERR! gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/home/pi/.cache/node-gyp/16.13.1/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/home/pi/.cache/node-gyp/16.13.1',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/16.13.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! make: g++: Datei oder Verzeichnis nicht gefunden
npm ERR! make: *** [noble.target.mk:20: Release/obj.target/noble.node] Fehler 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 5.10.87-v7+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /usr/lib/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble
npm ERR! gyp ERR! node -v v16.13.1
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2021-12-27T14_57_31_149Z-debug-0.log

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "openToken": "***",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "*",
                        "deviceType": "Bot",
                        "bot": {
                            "mode": "switch",
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "*",
                        "deviceType": "Bot",
                        "bot": {
                            "mode": "switch",
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "*",
                        "deviceType": "Bot",
                        "bot": {
                            "mode": "switch",
                            "deviceType": "switch"
                        }
                    },
                    {
                        "deviceId": "*",
                        "deviceType": "Bot",
                        "bot": {
                            "mode": "switch",
                            "deviceType": "switch"
                        }
                    }
                ]
            },
            "platform": "SwitchBot"
        },

Screenshots

No response

Device & Model

Rapsberry pi 3b+

Node.js Version

v16.13.1

NPM Version

v8.3.0

Homebridge Version

v1.3.8

Homebridge Switchbot Plugin Version

v1.4.0

Homebridge Config UI X Plugin Version

v4.41.5

Operating System

Raspbian Bullseye (11)

@frimar75 frimar75 added the bug Something isn't working label Dec 27, 2021
@donavanbecker
Copy link
Collaborator

donavanbecker commented Dec 27, 2021

Did you follow the installation instructions?

See noble prerequisites for your OS. (This is used for BLE connection.)

@frimar75
Copy link
Author

frimar75 commented Dec 27, 2021

Hi,

I already used the plugin in the first version, switched to your version and it always worked without issues, this ist the first time, it refuses to update. ;)

@donavanbecker
Copy link
Collaborator

Duplicate of #151

@donavanbecker donavanbecker marked this as a duplicate of #151 Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants