ebaauw / homebridge-music

Homebridge plugin for iTunes with AirPlay speakers
Apache License 2.0
92 stars 7 forks source link

Install Error #1

Closed seydx closed 6 years ago

seydx commented 6 years ago

Hey,

im running homebridge on my mac with different plugins without any problems.

But i cant install this plugin. Following error occurs

sudo npm install -g homebridge-music --unsafe-perm

homebridge-music@0.1.0 postinstall /usr/local/lib/node_modules/homebridge-music (cd scripts; make)

osacompile -o iTunes.scpt iTunes.applescript osacompile -o Airfoil.scpt Airfoil.applescript Airfoil.applescript:68: error: Expected class name but found identifier. (-2741) make: *** [Airfoil.scpt] Error 1 npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! homebridge-music@0.1.0 postinstall: (cd scripts; make) npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the homebridge-music@0.1.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/seyitbayraktar/.npm/_logs/2018-01-13T08_43_15_916Z-debug.log

Any idea what i'm doing wrong?

ebaauw commented 6 years ago

Probably nothing. Looks like the AppleScript compiler doesn’t want to compile the Airfoil.applescript script file. Likely because you don’t have Airfoil installed? I’ll change the package to include the compiled scripts.

seydx commented 6 years ago

thats right, i dont have airfoil installed

ebaauw commented 6 years ago

Should be fixed in v0.1.1.

You no longer need to use --unsafe-perm, so just sudo npm -g i homebridge-music should do the trick.

seydx commented 6 years ago

yes works great thank you :)

duongdev commented 6 years ago

Please set the node engine to >=8.0.0 if possible. I am using Node 8.5 but cannot upgrade for now.

ebaauw commented 6 years ago

I'm not going to, but you're welcome to do so yourself, albeit at your own risk - I develop & test against the set versions.

The setting is in homebridge-music's package.json: https://github.com/ebaauw/homebridge-music/blob/bec1a790557458206cc6e718be390ed18e3780c2/package.json#L13

Typically this file installs to /usr/lib/node_modules/homebridge-music/package.json. You can edit it, after installing.