dhleong / ps4-waker

Wake your PS4 over LAN (with help from the Playstation App)
MIT License
451 stars 40 forks source link

Having issues installing #78

Closed MaxHasADHD closed 6 years ago

MaxHasADHD commented 6 years ago

So I'm installing this on a raspberry pi to get working with Homebridge through https://github.com/luisiam/homebridge-cmdswitch2, but I'm having trouble installing PS4-waker.

First off, after installing trough npm install -g ps4-waker, ps4-waker gives me error command not found. I find it in /opt/node/bin and run it from there and get -bash: ps4-waker: line 3: syntax error near unexpected token `(' -bash: ps4-waker: line 3: `var {Detector, Device, Socket} = require('../')'

I see this error in the troubleshooting page, and that it means I have a older version of node it says, but node isn't updating to anything newer for me.

Not sure which is helpful but I see node -v v6.9.5 and nodejs -v v4.8.2. Any help is appreciated.

dhleong commented 6 years ago

Something is wonky with your node installation. If you look closely, it's actually bash that's complaining about the syntax error, which means it's not being run by node. If you pass the ps4-waker path to node instead of calling it directly, it'll work.

But the fact that the exe wasn't available when you installed globally is definitely a concern. I don't have a pi so can't help you specifically, but I'd definitely consider reinstalling node.

On Thu, Feb 8, 2018, 8:41 AM Maximilian Litteral notifications@github.com wrote:

So I'm installing this on a raspberry pi to get working with Homebridge through https://github.com/luisiam/homebridge-cmdswitch2, but I'm having trouble installing PS4-waker.

First off, after installing trough npm install -g ps4-waker, ps4-waker gives me error command not found. I find it in /opt/node/bin and run it from there and get -bash: ps4-waker: line 3: syntax error near unexpected token (' -bash: ps4-waker: line 3:var {Detector, Device, Socket} = require('../')'

I see this error in the troubleshooting page, and that it means I have a older version of node it says, but node isn't updating to anything newer for me.

Not sure which is helpful but I see node -v v6.9.5 and nodejs -v v4.8.2. Any help is appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhleong/ps4-waker/issues/78, or mute the thread https://github.com/notifications/unsubscribe-auth/AAx0Fs-8JFV95rDJ4Kr00hH_RPvnS2jHks5tSvlwgaJpZM4R-Xam .