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

Installation Error #462

Open
vaskomichal opened this issue Feb 21, 2021 · 1 comment
Open

Installation Error #462

vaskomichal opened this issue Feb 21, 2021 · 1 comment

Comments

@vaskomichal
Copy link

Hi, I try to run example on my raspberry pi zero w. I download project from git upload to RSP and run npm install. But I see this error

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.)
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
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.)
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! code 1
npm ERR! path /home/pi/bleno-master/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: Entering directory '/home/pi/bleno-master/node_modules/node-hid/build'
npm ERR! CC(target) Release/obj.target/hidapi-linux-hidraw/hidapi/linux/hid.o
npm ERR! AR(target) Release/obj.target/hidapi-linux-hidraw.a
npm ERR! COPY Release/hidapi-linux-hidraw.a
npm ERR! CXX(target) Release/obj.target/HID-hidraw/src/HID.o
npm ERR! SOLINK_MODULE(target) Release/obj.target/HID-hidraw.node
npm ERR! make: Leaving directory '/home/pi/bleno-master/node_modules/node-hid/build'
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.7.3 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [ '/home/pi/.npm-global/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 '/home/pi/bleno-master/node_modules/node-hid/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/pi/.npm-global/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/10.23.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/10.23.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/pi/.npm-global/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/10.23.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/pi/bleno-master/node_modules/node-hid',
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 make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/HID.cc:71:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException);
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:74:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException);
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:156:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException)
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:167:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException)
npm ERR! ^~~~~
npm ERR! ../src/HID.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE HID::read(Nan::NAN_METHOD_ARGS_TYPE)':
npm ERR! ../src/HID.cc:262:70: 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]
npm ERR! uv_queue_work(uv_default_loop(), req, recvAsync, (uv_after_work_cb)recvAsyncDone);
npm ERR! ^~~~~~~~~~~~~
npm ERR! In file included from ../src/HID.cc:34:
npm ERR! ../src/HID.cc: At global scope:
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/node.h:573:43: warning: cast between incompatible function types from 'void ()(v8::Localv8::Object)' to 'node::addon_register_func' {aka 'void ()(v8::Localv8::Object, v8::Localv8::Value, void*)'} [-Wcast-function-type]
npm ERR! (node::addon_register_func) (regfunc),
npm ERR! ^
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/node.h:607:3: note: in expansion of macro 'NODE_MODULE_X'
npm ERR! NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../src/HID.cc:646:3: note: in expansion of macro 'NODE_MODULE'
npm ERR! NODE_MODULE(HID, init);
npm ERR! ^~~~~~~~~~~
npm ERR! In file included from /home/pi/.cache/node-gyp/10.23.1/include/node/node.h:63,
npm ERR! from ../src/HID.cc:34:
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]':
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/node_object_wrap.h:84:78: required from here
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfonode::ObjectWrap::Callback' {aka 'void (
)(const v8::WeakCallbackInfonode::ObjectWrap&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
npm ERR! reinterpret_cast(callback), type);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P
, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]':
npm ERR! ../../nan/nan_object_wrap.h:65:61: required from here
npm ERR! /home/pi/.cache/node-gyp/10.23.1/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfoNan::ObjectWrap::Callback' {aka 'void (
)(const v8::WeakCallbackInfoNan::ObjectWrap&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
npm ERR! /usr/bin/ld: cannot find -lusb-1.0
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make: *** [HID-hidraw.target.mk:140: Release/obj.target/HID-hidraw.node] Error 1
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 (/home/pi/.npm-global/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 5.10.11+
npm ERR! gyp ERR! command "/usr/bin/node" "/home/pi/.npm-global/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/pi/bleno-master/node_modules/node-hid
npm ERR! gyp ERR! node -v v10.23.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
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-02-21T11_25_03_359Z-debug.log
pi@raspberrypi:~/bleno-master $ sudo npm install
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.)
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
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.)
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! code 1
npm ERR! path /home/pi/bleno-master/node_modules/node-hid
npm ERR! command failed
npm ERR! command sh -c prebuild-install || node-gyp rebuild
npm ERR! make: Entering directory '/home/pi/bleno-master/node_modules/node-hid/build'
npm ERR! CC(target) Release/obj.target/hidapi-linux-hidraw/hidapi/linux/hid.o
npm ERR! AR(target) Release/obj.target/hidapi-linux-hidraw.a
npm ERR! COPY Release/hidapi-linux-hidraw.a
npm ERR! CXX(target) Release/obj.target/HID-hidraw/src/HID.o
npm ERR! SOLINK_MODULE(target) Release/obj.target/HID-hidraw.node
npm ERR! make: Leaving directory '/home/pi/bleno-master/node_modules/node-hid/build'
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.7.3 found at "/usr/bin/python3"
npm ERR! gyp WARN EACCES current user ("pi") does not have permission to access the dev dir "/root/.cache/node-gyp/10.23.1"
npm ERR! gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [ '/usr/local/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 '/home/pi/bleno-master/node_modules/node-hid/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/tmp/.node-gyp/10.23.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=/tmp/.node-gyp/10.23.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/tmp/.node-gyp/10.23.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/pi/bleno-master/node_modules/node-hid',
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 make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/HID.cc:71:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException);
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:74:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException);
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:156:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException)
npm ERR! ^~~~~
npm ERR! ../src/HID.cc:167:3: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
npm ERR! throw(JSException)
npm ERR! ^~~~~
npm ERR! ../src/HID.cc: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE HID::read(Nan::NAN_METHOD_ARGS_TYPE)':
npm ERR! ../src/HID.cc:262:70: 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]
npm ERR! uv_queue_work(uv_default_loop(), req, recvAsync, (uv_after_work_cb)recvAsyncDone);
npm ERR! ^~~~~~~~~~~~~
npm ERR! In file included from ../src/HID.cc:34:
npm ERR! ../src/HID.cc: At global scope:
npm ERR! /tmp/.node-gyp/10.23.1/include/node/node.h:573:43: warning: cast between incompatible function types from 'void ()(v8::Localv8::Object)' to 'node::addon_register_func' {aka 'void ()(v8::Localv8::Object, v8::Localv8::Value, void*)'} [-Wcast-function-type]
npm ERR! (node::addon_register_func) (regfunc),
npm ERR! ^
npm ERR! /tmp/.node-gyp/10.23.1/include/node/node.h:607:3: note: in expansion of macro 'NODE_MODULE_X'
npm ERR! NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../src/HID.cc:646:3: note: in expansion of macro 'NODE_MODULE'
npm ERR! NODE_MODULE(HID, init);
npm ERR! ^~~~~~~~~~~
npm ERR! In file included from /tmp/.node-gyp/10.23.1/include/node/node.h:63,
npm ERR! from ../src/HID.cc:34:
npm ERR! /tmp/.node-gyp/10.23.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]':
npm ERR! /tmp/.node-gyp/10.23.1/include/node/node_object_wrap.h:84:78: required from here
npm ERR! /tmp/.node-gyp/10.23.1/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfonode::ObjectWrap::Callback' {aka 'void (
)(const v8::WeakCallbackInfonode::ObjectWrap&)'} to 'Callback' {aka 'void ()(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
npm ERR! reinterpret_cast(callback), type);
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /tmp/.node-gyp/10.23.1/include/node/v8.h: In instantiation of 'void v8::PersistentBase::SetWeak(P
, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]':
npm ERR! ../../nan/nan_object_wrap.h:65:61: required from here
npm ERR! /tmp/.node-gyp/10.23.1/include/node/v8.h:9502:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfoNan::ObjectWrap::Callback' {aka 'void (
)(const v8::WeakCallbackInfoNan::ObjectWrap&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo&)'} [-Wcast-function-type]
npm ERR! /usr/bin/ld: cannot find -lusb-1.0
npm ERR! collect2: error: ld returned 1 exit status
npm ERR! make: *** [HID-hidraw.target.mk:140: Release/obj.target/HID-hidraw.node] Error 1
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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (events.js:198:13)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
npm ERR! gyp ERR! System Linux 5.10.11+
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /home/pi/bleno-master/node_modules/node-hid
npm ERR! gyp ERR! node -v v10.23.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

Thanks!

@ndrake
Copy link

ndrake commented May 31, 2021

It looks like you are using Node v10. This will only work with previous versions. I believe this fork: https://github.com/abandonware/bleno has been updated to support newer Node versions.

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

2 participants