stephen / airsonos

:musical_note: AirPlay to Sonos
MIT License
2.1k stars 255 forks source link

Installation failed with newest node version #387

Open deluxestyle opened 7 years ago

deluxestyle commented 7 years ago

I try to install airsonos on my PI 2 on Stretch and node v.8.9.1

But I always get below error message: fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-a694fbc7': Permission denied

Any ideas?

aalexsmithh commented 6 years ago

Have you tried putting sudo before whatever command gets that error?

deluxestyle commented 6 years ago

yes. but nothing changes

davidvermillion commented 6 years ago

Same issue for me

davidvermillion commented 6 years ago

Was able to make progress by doing option 2 from here:

https://docs.npmjs.com/getting-started/fixing-npm-permissions

MitchellSingleton commented 6 years ago

I can't speak towards changing the install directory or the using an installation manager mentioned in the link above. I had a working system on node.js 4.x I upgraded to 8.x. I was then unable to run airsonos due to errors about the nodetunes and nicercast modules being compiled against a different version of node.js. I used these commands to rebuild the modules on my system (raspPi 2): sudo npm install -g --unsafe-perm nodetunes sudo npm install -g --unsafe-perm nicercast

This built new modules. Then I had to move the modules inside of airsonos out of the way and symlink the newly built modules in place: sudo mv /usr/lib/node_modules/airsonos/node_modules/nodetunes/ /usr/lib/node_modules/airsonos/node_modules/nodetunes_old sudo mv /usr/lib/node_modules/airsonos/node_modules/nicercast/ /usr/lib/node_modules/airsonos/node_modules/nicercast_old

sudo ln -s /usr/lib/node_modules/nodetunes/ /usr/lib/node_modules/airsonos/node_modules/ sudo ln -s /usr/lib/node_modules/nicercast/ /usr/lib/node_modules/airsonos/node_modules/

that allowed me to start airsonos.

MitchellSingleton commented 6 years ago

Actually, airsonos started however I was getting a key length error and airsonos would die. I additionally applied these patches and now have a working system:

https://github.com/stephen/airsonos/issues/342#issuecomment-295770479