norman784 / libimobiledevice-node

A cross-platform software protocol library and tools to communicate with iOS® devices natively.
MIT License
25 stars 8 forks source link

Libimobiledevice-node seems to be broken when updating to node v14 #14

Closed didix21 closed 3 years ago

didix21 commented 3 years ago

Check the following error:

gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
12569
  CXX(target) Release/obj.target/imobiledevice/src/binding.o
12570
../src/binding.cc:16:27: error: no template named 'Handle'
12571
    char *ToCString(const Handle<Value>& value) {
12572
                          ^
12573
../src/binding.cc:25:9: error: no template named 'Handle'
12574
        Handle<Value> res[2];
12575
        ^
12576
../src/binding.cc:33:9: error: no template named 'Handle'
12577
        Handle<Object> object;
12578
        ^
12579
../src/binding.cc:50:18: error: no template named 'Handle'
12580
        object = Handle<Object>::Cast(args[0]);
12581
                 ^
12582
../src/binding.cc:54:13: error: no template named 'Handle'
12583
            Handle<Value> res[2];
12584
Error: node-gyp failded
12585
            ^
12586
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
12587
../src/binding.cc:63:22: error: expected ';' after expression
12588
        Handle<Value> debug = object->Get(String::NewFromUtf8(_isolate, "debug"));
12589
                     ^
12590
                     ;
12591
../src/binding.cc:63:9: error: use of undeclared identifier 'Handle'
12592
        Handle<Value> debug = object->Get(String::NewFromUtf8(_isolate, "debug"));
12593
        ^
12594
../src/binding.cc:63:23: error: unexpected namespace name 'debug': expected expression
12595
        Handle<Value> debug = object->Get(String::NewFromUtf8(_isolate, "debug"));
12596
                      ^
12597
../src/binding.cc:64:9: error: no template named 'Handle'
12598
        Handle<Value> udid = object->Get(String::NewFromUtf8(_isolate, "udid"));
12599
        ^
12600
../src/binding.cc:65:9: error: no template named 'Handle'
12601
        Handle<Value> source = object->Get(String::NewFromUtf8(_isolate, "source"));
12602
        ^
12603
../src/binding.cc:66:23: error: use of undeclared identifier 'backup'; did you mean 'backup2'?
12604
        Handle<Value> backup = object->Get(String::NewFromUtf8(_isolate, "backup"));
12605
                      ^~~~~~
12606
                      backup2
12607
../src/binding.cc:30:10: note: 'backup2' declared here
12608
    void backup2(const FunctionCallbackInfo<Value>& args) {
12609
         ^
12610
../src/binding.cc:66:22: error: expected ';' after expression
12611
        Handle<Value> backup = object->Get(String::NewFromUtf8(_isolate, "backup"));
12612
                     ^
12613
                     ;
12614
../src/binding.cc:66:9: error: use of undeclared identifier 'Handle'
12615
        Handle<Value> backup = object->Get(String::NewFromUtf8(_isolate, "backup"));
12616
        ^
12617
../src/binding.cc:67:9: error: no template named 'Handle'
12618
        Handle<Value> restore = object->Get(String::NewFromUtf8(_isolate, "restore"));
12619
        ^
12620
../src/binding.cc:68:22: error: expected ';' after expression
12621
        Handle<Value> system = object->Get(String::NewFromUtf8(_isolate, "system"));
12622
                     ^
12623
                     ;
12624
../src/binding.cc:68:9: error: use of undeclared identifier 'Handle'
12625
        Handle<Value> system = object->Get(String::NewFromUtf8(_isolate, "system"));
12626
        ^
12627
../src/binding.cc:69:9: error: no template named 'Handle'
12628
        Handle<Value> reboot = object->Get(String::NewFromUtf8(_isolate, "reboot"));
12629
        ^
12630
../src/binding.cc:70:23: error: use of undeclared identifier 'copy'; did you mean 'bcopy'?
12631
        Handle<Value> copy = object->Get(String::NewFromUtf8(_isolate, "copy"));
12632
                      ^~~~
12633
                      bcopy
12634
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/strings.h:71:7: note: 'bcopy' declared here
12635
void     bcopy(const void *, void *, size_t) __POSIX_C_DEPRECATED(200112L);
12636
         ^
12637
../src/binding.cc:70:22: error: expected ';' after expression
12638
        Handle<Value> copy = object->Get(String::NewFromUtf8(_isolate, "copy"));
12639
                     ^
12640
                     ;
12641
fatal error: too many errors emitted, stopping now [-ferror-limit=]
12642
20 errors generated.
12643
make: *** [Release/obj.target/imobiledevice/src/binding.o] Error 1
12644
gyp ERR! build error 
12645
gyp ERR! stack Error: `make` failed with exit code: 2
12646
gyp ERR! stack     at ChildProcess.onExit (/Users/runner/work/libimobiledevice-node/libimobiledevice-node/node_modules/node-gyp/lib/build.js:194:23)
12647
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
12648
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
12649
gyp ERR! System Darwin 19.6.0
12650
gyp ERR! command "/Users/runner/hostedtoolcache/node/14.16.1/x64/bin/node" "/Users/runner/work/libimobiledevice-node/libimobiledevice-node/node_modules/.bin/node-gyp" "rebuild"
12651
gyp ERR! cwd /Users/runner/work/libimobiledevice-node/libimobiledevice-node
12652
gyp ERR! node -v v14.16.1
12653
gyp ERR! node-gyp -v v8.0.0
12654
gyp ERR! not ok 
12655
error Command failed with exit code 1.
12656
Error: Process completed with exit code 1.
didix21 commented 3 years ago

Solved