-
Notifications
You must be signed in to change notification settings - Fork 23
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
Unable to build this library #12
Comments
Hi, The issue is with the building of the usb module, this package is in optionalDependencies so this failure should not make |
Hello Haavardlian, Please clarify only one last thing. ERROR in ../escpos-master/node_modules/@serialport/parser-delimiter/lib/index.js
Mac:BTBle Nadeem$ |
Hi Thanks for writing this library.
I am trying to add bluetooth functionality to this library and add it to my main project. I download this git project and tried executing $npm i which throws lot of error as below.Can you tell me how to add this project to my other project as node module after making changes.
Mac:escpos-master Nadeem$ npm i
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v72-darwin-x64
.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with n
ode-gyp)
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
../libusb/libusb/core.c:2241:35: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (header_len < 0 || header_len >= sizeof(buf)) {
~~~~~~~~~~ ^ ~~~~~~~~~~~
../libusb/libusb/core.c:2250:44: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
if (text_len < 0 || text_len + header_len >= sizeof(buf)) {
~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~
2 warnings generated.
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/darwin_usb.o
../libusb/libusb/os/darwin_usb.c:344:3: warning: 'objc_registerThreadWithCollector' is deprecated: it does nothing. Define
OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic. [-Wdeprecated-declarations]
objc_registerThreadWithCollector();
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:243:1: note:
'objc_registerThreadWithCollector' has been explicitly marked deprecated here
OBJC_GC_DEPRECATED("it does nothing")
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/objc-auto.h:45:55: note:
expanded from macro 'OBJC_GC_DEPRECATED'
define OBJC_GC_DEPRECATED(message) attribute((deprecated(message ". Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily sil...
../libusb/libusb/os/darwin_usb.c:1281:27: warning: expression which evaluates to zero treated as a null pointer constant of type
'IOUSBInterfaceInterface550 **' (aka 'struct IOUSBInterfaceStruct550 **') [-Wnon-literal-null-conversion]
cInterface->interface = IO_OBJECT_NULL;
^~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOTypes.h:167:25: note:
expanded from macro 'IO_OBJECT_NULL'
#define IO_OBJECT_NULL ((io_object_t) 0)
^~~~~~~~~~~~~~~~~
2 warnings generated.
LIBTOOL-STATIC Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc:66:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
target->Set(Nan::New("INIT_ERROR").ToLocalChecked(), Nan::New(res));
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/node_usb.cc:99:73: error: too few arguments to function call, single argument 'context' was not specified
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
~~~~~~~~~~~~~~~~~~~~ ^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2611:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
../src/node_usb.cc:103:53: error: too few arguments to function call, single argument 'context' was not specified
libusb_set_debug(usb_context, info[0]->Uint32Value());
~~~~~~~~~~~~~~~~~~~~ ^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2611:3: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT attribute((warn_unused_result))
^
../src/node_usb.cc:116:8: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
arr->Set(i, Device::get(devs[i]));
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3411:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/node_usb.cc:151:7: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
../../nan/nan.h:1066:3: note: 'MakeCallback' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^
../../nan/nan.h:104:40: note: expanded from macro 'NAN_DEPRECATED'
define NAN_DEPRECATED attribute((deprecated))
../src/node_usb.cc:301:5: error: no matching member function for call to 'ToObject'
e->ToObject()->Set(Nan::New("errno").ToLocalChecked(), Nan::New(errorno));
~~~^~~~~~~~
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2576:44: note: candidate function not viable: requires single argument
'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
^
/Users/Nadeem/Library/Caches/node-gyp/12.14.1/include/node/v8.h:2590:31: note: candidate function not viable: requires single argument
'isolate', but no arguments were provided
Local ToObject(Isolate* isolate) const);
^
3 warnings and 3 errors generated.
make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 1
gyp ERR! build error
gyp ERR! stack Error:
make
failed with exit code: 2gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:223:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/Nadeem/Downloads/escpos-master/node_modules/usb
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/Nadeem/Downloads/escpos-master/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:223:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 19.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/Nadeem/Downloads/escpos-master/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/Nadeem/Downloads/escpos-master/node_modules/usb
node-pre-gyp ERR! node -v v12.14.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/Users/Nadeem/Downloads/escpos-master/node_modules/usb/src/binding --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install:
node-pre-gyp install --fallback-to-build
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 315 packages in 8.032s
3 packages are looking for funding
run
npm fund
for detailsfound 0 vulnerabilities
Mac:escpos-master Nadeem$
The text was updated successfully, but these errors were encountered: