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

Cannot install the plugin correctly #1

Open
mksmo opened this issue Feb 6, 2020 · 11 comments
Open

Cannot install the plugin correctly #1

mksmo opened this issue Feb 6, 2020 · 11 comments

Comments

@mksmo
Copy link

mksmo commented Feb 6, 2020

Attaching log

npm WARN notice [SECURITY] debug has the following vulnerability: 1 low. Go here for more details: https://www.npmjs.com/advisories?search=debug&version=2.2.0 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.

> [email protected] install /usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/usb
> prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/a1f11e-usb-v1.6.2-node-v57-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v57-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v57-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.9.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/usb/build'
 CC(target) Release/obj.target/libusb/libusb/libusb/core.o
 CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
 CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
 CC(target) Release/obj.target/libusb/libusb/libusb/io.o
 CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
 CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
 CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
 CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
 CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
 CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
         ^~~~~~~~~~~
compilation terminated.
make: *** [libusb.target.mk:132: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.19.93-v7l+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/usb
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok

> [email protected] install /usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/bluetooth-hci-socket
> node-gyp rebuild

make: Entering directory '/usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/bluetooth-hci-socket/build'
 CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
In file included from /root/.node-gyp/8.9.0/include/node/node.h:63,
                from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
                from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::SetAllowCodeGenerationFromStringsCallback(v8::DeprecatedAllowCodeGenerationFromStringsCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10177:19: warning: cast between incompatible function types from ‘v8::DeprecatedAllowCodeGenerationFromStringsCallback’ {aka ‘bool (*)(v8::Local<v8::Context>)’} to ‘v8::FreshNewAllowCodeGenerationFromStringsCallback’ {aka ‘bool (*)(v8::Local<v8::Context>, v8::Local<v8::String>)’} [-Wcast-function-type]
          callback));
                  ^
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10222:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
      reinterpret_cast<Isolate::GCCallback>(callback));
                                                    ^
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10229:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void (*)(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void (*)(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
      reinterpret_cast<Isolate::GCCallback>(callback));
                                                    ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
    , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                             ^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                              ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                             ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
    Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                              ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                             ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance(int, v8::Local<v8::Value>*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
  Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
                                                                       ^
In file included from /root/.node-gyp/8.9.0/include/node/v8.h:26,
                from /root/.node-gyp/8.9.0/include/node/node.h:63,
                from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
                from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h:3832:31: note: declared here
                Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
                              ^~~~~~~~~~~
/root/.node-gyp/8.9.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
  declarator __attribute__((deprecated(message)))
  ^~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                            ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                             ^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
  Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
                                                                                            ^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
  NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
                                             ^~~~~~~~~~~~
In file included from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
                from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/root/.node-gyp/8.9.0/include/node/node.h:475:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
      (node::addon_register_func) (regfunc),                          \
                                          ^
/root/.node-gyp/8.9.0/include/node/node.h:506:3: note: in expansion of macro ‘NODE_MODULE_X’
  NODE_MODULE_X(modname, regfunc, NULL, 0)
  ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(binding, BluetoothHciSocket::Init);
^~~~~~~~~~~
In file included from /root/.node-gyp/8.9.0/include/node/node.h:63,
                from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
                from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/root/.node-gyp/8.9.0/include/node/node_object_wrap.h:85:78:   required from here
/root/.node-gyp/8.9.0/include/node/v8.h:9200:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
               reinterpret_cast<Callback>(callback), type);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/8.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61:   required from here
/root/.node-gyp/8.9.0/include/node/v8.h:9200:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
 SOLINK_MODULE(target) Release/obj.target/binding.node
 COPY Release/binding.node
make: Leaving directory '/usr/local/lib/node_modules/homebridge-redmond-ms170s/node_modules/bluetooth-hci-socket/build'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-redmond-ms170s/node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/homebridge-redmond-ms170s/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `prebuild-install --verbose || node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ [email protected]
added 69 packages in 31.723s

And is there an ability to apply this plugin to REDMOND RK-M171S?

Thank's for your answer!

@guinmoon
Copy link
Owner

what node js version you use? try install "npm i -g --unsafe-perm noble"

@mksmo
Copy link
Author

mksmo commented Mar 24, 2020

what node js version you use? try install "npm i -g --unsafe-perm noble"

I tried on 9.11.2 and on 12.16.1

`pi@raspberrypi:~ $ sudo npm i -g --unsafe-perm noble
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EAI_AGAIN: request to https://registry.npmjs.org/minimist failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

[email protected] install /usr/lib/node_modules/noble/node_modules/usb
prebuild-install --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.3
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/1a8738-usb-v1.6.2-node-v72-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v72-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.2/usb-v1.6.2-node-v72-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.16.1 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/usr/lib/node_modules/noble/node_modules/usb/build'
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
../libusb/libusb/os/linux_udev.c:40:21: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^
compilation terminated.
libusb.target.mk:148: recipe for target 'Release/obj.target/libusb/libusb/libusb/os/linux_udev.o' failed
make: *** [Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/usr/lib/node_modules/noble/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.19.66-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/noble/node_modules/usb
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connection@~0.1.4 (node_modules/noble/node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/noble/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: prebuild-install --verbose || node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

@guinmoon
Copy link
Owner

I also had a problem installing the noble on node 11 and it seems I found a solution here
noble/node-bluetooth-hci-socket#84

npm install "https://github.com/jrobeson/node-bluetooth-hci-socket/#fix-builds-for-node-10"

@mksmo
Copy link
Author

mksmo commented Mar 24, 2020

@mksmo
Copy link
Author

mksmo commented Mar 24, 2020

npm install "https://github.com/jrobeson/node-bluetooth-hci-socket/#fix-builds-for-node-10"

I've got such error:

pi@raspberrypi:~ $ sudo npm install "https://github.com/jrobeson/node-bluetooth-hci-socket/#fix-builds-for-node-10"
npm ERR! code 128
npm ERR! Command failed: git clone --depth=1 -q -b fix-builds-for-node-10 https://github.com/jrobeson/node-bluetooth-hci-socket.git /root/.npm/_cacache/tmp/git-clone-88f25fd7
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-88f25fd7': Permission denied
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-03-24T13_20_10_399Z-debug.log

@guinmoon
Copy link
Owner

Хм у вас что то с разрешениями судя по всему.

@guinmoon
Copy link
Owner

Hmm, you have something with permissions apparently. Try installing version 8 of noble.

@mksmo
Copy link
Author

mksmo commented Mar 24, 2020

Хм у вас что то с разрешениями судя по всему.

Есть смысл попробовать установить всё с нуля?

@guinmoon
Copy link
Owner

Попробуй поставить nvm и поменять версию node на 8. Я тоже сталкивался с проблемами в установке noble, но к сожалению не помню точно что мне помогло. А на 8й версии все устанавливалось сразу.

@mksmo
Copy link
Author

mksmo commented Mar 24, 2020

Понял, спасибо за совет. Буду пробовать.

@seenve
Copy link

seenve commented Jan 12, 2021

Ребят, есть ли возможность, поставить для чайника REDMOND SkyKettle G212S?

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

3 participants