Closed ricardogo closed 10 months ago
Hi @ricardogo, I ran into the same issues but was able to get things working by upgrading most of the packages. You might try looking at the fork I just made:
@codybrom If you can roll your updates into a pull request (or 2) I'm happy to roll the updates in here to help people find them/upgrade. Alternatively, if you're using the code (I'm no longer using this code -- I have a different hw/sw stack I'm using now, unfortunately not fit to share) and plan to improve it and maintain the code, I'm happy to link to your fork from my readme.
Hi Ryan! I'd love to take that on. I'm hoping to get a few more years out of my setup and had to rebuild recently when a card died. I'll send a PR as well.
Thanks @codybrom. I've merged your changes. I've now way to test, but @ricardogo let me know if this fixes things for you and I'll close the issue.
Thanks @codybrom. I've merged your changes. I've now way to test, but @ricardogo let me know if this fixes things for you and I'll close the issue.
@ricardogo, and I know you said you're not technical so if you have questions about bringing these changes into your project I'm happy to help answer them!
Hey both, thank you for your (extremely quick) help!
npm install
ran correctly on the latest version, thank you both!
just FYI, it outputs this warning: npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'sonos-http-api@1.6.9', npm WARN EBADENGINE required: { node: '>=4.0.0', npm: '^2.0.0' }, npm WARN EBADENGINE current: { node: 'v20.11.0', npm: '10.2.4' } npm WARN EBADENGINE }
I will try and get this up and running — but this issue can be closed!
Hi there,
I'm following the guide to install, this and get this error during
npm install
. This is on a Raspberry Pi 2.PS: I'm not a technical person and simply trying to follow the step-by-step instructions!
npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'sonos-http-api@1.6.9', npm WARN EBADENGINE required: { node: '>=4.0.0', npm: '^2.0.0' }, npm WARN EBADENGINE current: { node: 'v20.11.0', npm: '10.2.4' } npm WARN EBADENGINE } npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated then-read-stream@1.5.1: Package renamed to peak-readable. npm WARN deprecated request-promise@1.0.2: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! code 1 npm ERR! path /home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! make: Entering directory '/home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite/build' npm ERR! CXX(target) Release/obj.target/pcsclite/src/addon.o npm ERR! make: Leaving directory '/home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite/build' npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@20.11.0 | 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 '/home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite/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 '/root/.cache/node-gyp/20.11.0/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=/root/.cache/node-gyp/20.11.0', 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=/root/.cache/node-gyp/20.11.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite', 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! In file included from ../../../nan/nan.h:176, npm ERR! from ../src/pcsclite.h:4, npm ERR! from ../src/addon.cpp:1: npm ERR! ../../../nan/nan_callbacks.h:55:23: error: 'AccessorSignature' is not a member of 'v8' npm ERR! 55 | typedef v8::Local Sig;
npm ERR! | ^ Sig;
npm ERR! | ^
npm ERR! In file included from ../src/pcsclite.h:4,
npm ERR! from ../src/addon.cpp:1:
npm ERR! ../../../nan/nan.h: In function 'void Nan::SetAccessor(v8::Local, v8::Local, Nan::GetterCallback, Nan::SetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)':
npm ERR! ../../../nan/nan.h:2549:16: error: no matching function for call to 'v8::ObjectTemplate::SetAccessor(v8::Local&, void (&)(v8::Local, const v8::PropertyCallbackInfo&), void ( &)(v8::Local, v8::Local, const v8::PropertyCallbackInfo&), v8::Local&, v8::AccessControl&, v8::PropertyAttribute&, Nan::imp::Sig&)'
npm ERR! 2549 | , signature);
npm ERR! | ^
npm ERR! In file included from /root/.cache/node-gyp/20.11.0/include/node/v8-function.h:15,
npm ERR! from /root/.cache/node-gyp/20.11.0/include/node/v8.h:33,
npm ERR! from /root/.cache/node-gyp/20.11.0/include/node/node.h:73,
npm ERR! from ../../../nan/nan.h:56,
npm ERR! from ../src/pcsclite.h:4,
npm ERR! from ../src/addon.cpp:1:
npm ERR! /root/.cache/node-gyp/20.11.0/include/node/v8-template.h:809:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Local, v8::AccessorGetterCallback, v8::AccessorSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
npm ERR! 809 | void SetAccessor(
npm ERR! | ^, v8::AccessorNameGetterCallback, v8::AccessorNameSetterCallback, v8::Local, v8::AccessControl, v8::PropertyAttribute, v8::SideEffectType, v8::SideEffectType)'
npm ERR! 816 | void SetAccessor(
npm ERR! | ^)' to 'node::addon_register_func' {aka 'void ( )(v8::Local, v8::Local, void*)'} [-Wcast-function-type]
npm ERR! 1172 | (node::addon_register_func) (regfunc), \
npm ERR! | ^ (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.1.21-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 /home/ricardo/node-sonos-nfc/node_modules/@pokusew/pcsclite
npm ERR! gyp ERR! node -v v20.11.0
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok
~~~~ npm ERR! ../../../nan/nan_callbacks.h:55:40: error: template argument 1 is invalid npm ERR! 55 | typedef v8::Local~~npm ERR! /root/.cache/node-gyp/20.11.0/include/node/v8-template.h:814:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType' npm ERR! 814 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! |~~~^~~~~~~~~~~~npm ERR! /root/.cache/node-gyp/20.11.0/include/node/v8-template.h:816:8: note: candidate: 'void v8::ObjectTemplate::SetAccessor(v8::Local~~npm ERR! /root/.cache/node-gyp/20.11.0/include/node/v8-template.h:821:22: note: no known conversion for argument 7 from 'Nan::imp::Sig' {aka 'int'} to 'v8::SideEffectType' npm ERR! 821 | SideEffectType getter_side_effect_type = SideEffectType::kHasSideEffect, npm ERR! |~~~^~~~~~~~~~~~npm ERR! In file included from ../../../nan/nan.h:56, npm ERR! from ../src/pcsclite.h:4, npm ERR! from ../src/addon.cpp:1: npm ERR! ../src/addon.cpp: At global scope: npm ERR! /root/.cache/node-gyp/20.11.0/include/node/node.h:1172:7: warning: cast between incompatible function types from 'void ()(v8::Local~~~~~~~~ npm ERR! /root/.cache/node-gyp/20.11.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X' npm ERR! 1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) npm ERR! | ^~~~~ npm ERR! ../src/addon.cpp:9:1: note: in expansion of macro 'NODE_MODULE' npm ERR! 9 | NODE_MODULE(pcsclite, init_all) npm ERR! | ^~~npm ERR! make: *** [pcsclite.target.mk:124: Release/obj.target/pcsclite/src/addon.o] 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.