evandcoleman / node-appletv

A node module for interacting with an Apple TV (4th-generation or later) over the Media Remote Protocol.
https://evandcoleman.github.io/node-appletv/
MIT License
180 stars 48 forks source link

Problem to install #43

Open oculist37 opened 4 years ago

oculist37 commented 4 years ago

Hi,

I also experience some problem to install.

Hombrew installed, libtool autoconf automake installed, node installed. The process npm install -g node-appletv seems to proceed as it supposed to do but after a few lines I have : `../src/ed25519.cc:19:98: error: too few arguments to function call, single argument 'context' was not specified if ((info.Length() < 1) || (!Buffer::HasInstance(info[0])) || (Buffer::Length(info[0]->ToObject()) != 32)) {


/Users/jeremiexxxx/Library/Caches/node-gyp/14.5.0/include/node/v8.h:2818:3: note: 'ToObject' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
  ^
/Users/jeremiexxxx/Library/Caches/node-gyp/14.5.0/include/node/v8config.h:422:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/ed25519.cc:22:77: error: too few arguments to function call, single argument 'context' was not specified
        const unsigned char* seed = (unsigned char*)Buffer::Data(info[0]->ToObject());
`

20 lines like that and after : 
`fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/ed25519/src/ed25519.o] Error 1
`
I am a bit stuck. What do I miss ?  Thanks

I am on Mac Catalina
donholly commented 4 years ago

Looks like @deanophilip forked and updated this package to work with Node 12.X: https://github.com/deanophilip/node-appletv

You can still npm install -g the package by doing:

  1. Clone the fork above
  2. cd /path/to/cloned/fork
  3. npm install -g .

Though my appletv pair command doesn't seem to work (gets stuck at Initiating Pairing):

appletv pair
āœ” Connecting to Living Room
ā ¼ Initiating Pairing
deanophilip commented 4 years ago

I also am not able to use the appletv pair command through the CLI now.. Not sure if that's a change on the tvOS side or not. Check out line 47 in src/lib/pairing.ts: await this.device.sendMessage('CryptoPairingMessage', 'CryptoPairingMessage', requestMessage, true); I had to change the waitForResponse boolean to true a few months back when I was originally getting this working on my Windows machine with tvOS 13. I now have tvOS 14 and it is not working with that change. I switched back to the original to get the CLI working again: await this.device.sendMessage('CryptoPairingMessage', 'CryptoPairingMessage', requestMessage, false);

donholly commented 4 years ago

@deanophilip thanks for the reply! I just tried switching to false and re-installing via npm i -g . but seems to still be stuck on Initiating Pairing šŸ˜¢

Edit: Sorry disregard me! Had to run npm run build before installing it šŸ˜„ I was able to pair it. Thanks!!