lsongdev / lsongdev/node-escpos

yarn bluetooth error

Open
#365 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.6k
Forks
443
PR merge metrics
No merged PRs in 30d

Description

Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@12.22.1 | darwin | x64
gyp info find Python using Python version 2.7.16 found at "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python"
gyp WARN EACCES current user ("lulian") does not have permission to access the dev dir "/Users/lulian/Library/Caches/node-gyp/12.22.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp"
gyp info spawn /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/lulian/Downloads/node-escpos-3/packages/bluetooth/node_modules/node-bluetooth/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/lulian/Downloads/node-escpos-3/packages/bluetooth/node_modules/node-bluetooth',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/BluetoothSerialPort/src/osx/DeviceINQ.o
../src/osx/DeviceINQ.mm:75:16: warning: 'Call' is deprecated [-Wdeprecated-declarations]
found->Call(2, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'

define NAN_DEPRECATED attribute((deprecated))

                                   ^

../src/osx/DeviceINQ.mm:78:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(0, 0);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'

define NAN_DEPRECATED attribute((deprecated))

                                   ^

../src/osx/DeviceINQ.mm:109:16: warning: 'Call' is deprecated [-Wdeprecated-declarations]
baton->cb->Call(1, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'

define NAN_DEPRECATED attribute((deprecated))

                                   ^

../src/osx/DeviceINQ.mm:121:28: error: expected ')'
void DeviceINQ::Init(Handle target) {
^
../src/osx/DeviceINQ.mm:121:21: note: to match this '('
void DeviceINQ::Init(Handle target) {
^
../src/osx/DeviceINQ.mm:121:17: error: out-of-line definition of 'Init' does not match any declaration in 'DeviceINQ'
void DeviceINQ::Init(Handle target) {
^~~~
../src/osx/DeviceINQ.mm:133:5: error: use of undeclared identifier 'target'
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
^
../src/osx/DeviceINQ.mm:133:72: error: too few arguments to function call, single argument 'context' was not specified
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
~~~~~~~~~~~~~~ ^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:6126:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^
../src/osx/DeviceINQ.mm:134:5: error: use of undeclared identifier 'target'
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
^
../src/osx/DeviceINQ.mm:134:72: error: too few arguments to function call, single argument 'context' was not specified
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
~~~~~~~~~~~~~~ ^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:6126:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^
../src/osx/DeviceINQ.mm:135:5: error: use of undeclared identifier 'target'
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
^
../src/osx/DeviceINQ.mm:135:72: error: too few arguments to function call, single argument 'context' was not specified
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
~~~~~~~~~~~~~~ ^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:6126:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^
../src/osx/DeviceINQ.mm:136:5: error: use of undeclared identifier 'target'
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
^
../src/osx/DeviceINQ.mm:136:72: error: too few arguments to function call, single argument 'context' was not specified
target->Set(Nan::New("DeviceINQ").ToLocalChecked(), t->GetFunction());
~~~~~~~~~~~~~~ ^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:6126:46: note: 'GetFunction' declared here
V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
^
../src/osx/DeviceINQ.mm:228:16: warning: 'Call' is deprecated [-Wdeprecated-declarations]
found->Call(2, argv);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'

define NAN_DEPRECATED attribute((deprecated))

                                   ^

../src/osx/DeviceINQ.mm:231:15: warning: 'Call' is deprecated [-Wdeprecated-declarations]
callback->Call(0, 0);
^
../../nan/nan.h:1743:3: note: 'Call' has been explicitly marked deprecated here
NAN_DEPRECATED inline v8::Localv8::Value
^
../../nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'

define NAN_DEPRECATED attribute((deprecated))

                                   ^

../src/osx/DeviceINQ.mm:246:23: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value address(info[0]);
^ ~~~~~~~
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3142:5: note: candidate constructor not viable: no known conversion from 'v8::Localv8::Value' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3135:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Localv8::Value obj);
^
../src/osx/DeviceINQ.mm:297:20: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
deviceObj->Set(Nan::New("name").ToLocalChecked(), Nan::New([device.nameOrAddress UTF8String]).ToLocalChecked());
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:298:20: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
deviceObj->Set(Nan::New("address").ToLocalChecked(), Nan::New([device.addressString UTF8String]).ToLocalChecked());
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:308:25: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
serviceObj->Set(Nan::New("channel").ToLocalChecked(), Nan::New((int)channelID));
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:311:29: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
serviceObj->Set(Nan::New("name").ToLocalChecked(), Nan::New([[service getServiceName] UTF8String]).ToLocalChecked());
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:313:29: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
serviceObj->Set(Nan::New("name").ToLocalChecked(), Nan::Undefined());
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:315:28: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
servicesArray->Set(j, serviceObj);
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3507:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:317:20: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
deviceObj->Set(Nan::New("services").ToLocalChecked(), servicesArray);
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3498:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:319:22: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
resultArray->Set(i, deviceObj);
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8.h:3507:3: note: 'Set' has been explicitly marked deprecated here
V8_DEPRECATED("Use maybe version",
^
/var/folders/b9/ff3n4b213xs5bf1vkcx38fk80000gn/T/.node-gyp/12.22.1/include/node/v8config.h:328:29: note: expanded from macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^
../src/osx/DeviceINQ.mm:325:9: error: too few arguments to function call, expected 4, have 3; did you mean 'Nan::Call'?
cb->Call(Nan::GetCurrentContext()->Global(), 1, argv);
^~~~
Nan::Call
../../nan/nan_maybe_43_inl.h:345:30: note: 'Nan::Call' declared here
inline MaybeLocalv8::Value Call(
^
13 warnings and 12 errors generated.
make: *** [Release/obj.target/BluetoothSerialPort/src/osx/DeviceINQ.o] Error 1
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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/lulian/Downloads/node-escpos-3/packages/bluetooth/node_modules/node-bluetooth
gyp ERR! node -v v12.22.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported yarn Bluetooth build with Node 12.22.1 on macOS, then inspect packages/bluetooth/node_modules/node-bluetooth/src/osx/DeviceINQ.mm and the node-gyp diagnostics. Done means the Bluetooth package builds successfully without the reported compilation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, objective-c
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.