Closed reidcooper closed 4 years ago
I've also had similar problems with installing node-airplayhub (step #2), but I managed to get it done with git clone. You have to look for the node command: "which node". As you are talking about raspberry pi your nodejs command should be found at /usr/bin/nodejs, node should be a symlink to /usr/bin/nodejs: ln -s /usr/bin/nodejs /usr/bin/node.
As said before step #2 didn't work for me either. This is my terminal output if I run the npm command:
npm ERR! not a package /tmp/npm-21187-V24msAct/github.com/noelhibbard/node-airplayhub.git npm ERR! Error: ENOENT: no such file or directory, open '/tmp/npm-21187-V24msAct/github.com/noelhibbard/node-airplayhub.git-unpack/package.json' npm ERR! at Error (native) npm ERR! If you need help, you may report this entire log, npm ERR! including the npm and node versions, at: npm ERR! http://github.com/npm/npm/issues
npm ERR! System Linux 4.9.0-5.1-liquorix-amd64 npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "i" "-g" "https://github.com/noelhibbard/node-airplayhub.git" npm ERR! cwd /tmp/airplay npm ERR! node -v v4.7.2 npm ERR! npm -v 1.4.21 npm ERR! path /tmp/npm-21187-V24msAct/github.com/noelhibbard/node-airplayhub.git-unpack/package.json npm ERR! syscall open npm ERR! code ENOENT npm ERR! errno -2 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /tmp/airplay/npm-debug.log npm ERR! not ok code 0
At a glance I see both of you are running older versions of node and npm.
Yeah, I am going to redo this and get back to you! Thanks. are your dependencies up to date? @noelhibbard
I'm using Debian unstable, and these are the versions you can get in their unstable repositories.
@reidcooper: Are you using Raspbian?
@roccogranata, your version of node should be fine. @reidcooper however is on 0.10.29 and I suspect that may be his problem.
@roccogranata, try updating to the latest npm like this: npm i npm -g
and maybe update to the latest node-gyp like this npm i node-gyp -g
I believe I have it running now but I ran into two problems:
It would not link it to my bin so I had to find the package in the global node modules directory to run it.
It can find my two airplay devices however, it is extremely/pretty much unusable. The music won't consistently play. I just get a loud burst of music then it stops.
The shebang line (first line in index.js) is set to:
So it will only launch if node is in your path. I'm running Raspbian on my Raspberry Pi and that shebang line works perfect for other node packages I have tested on mine. I haven't tested node-airplayhub on it though.
As for the skipping. I have random hanging (mainly when running more than 2 zones) on my rig too but it's running on an old Nettop with an Intel Atom N230. I haven't verified yet but I think it's caused by the CPU not being able to keep up. My N230 is probably faster than the CPU on your Pi. Which Pi do you have?
I have another machine with an i5 that I was going to replace this old Nettop with. I will try to accomplish that tonight and report back if the hanging goes away for me.
I finally remembered to bring this spare machine home from the office until tonight. So I am just getting a chance to test it on this faster machine. I haven't done any extensive testing yet but so far I am not having any buffering on this i5 like I was on the Atom N230. So it looks like you need something with a reasonable CPU to handle this package. I have a Raspberry Pi 3 ordered for another project. It should be here on Friday. I will load it up and see how well it handles node-airplayhub.
Back again, I didn't have much time during last month, but I managed to get it done. The problem is the distribution's version of npm (Debian). As you already pointed out my version of npm is too old and I have to update it. But I ran into trouble as "npm i npm -g" puts the new version of npm to /usr/local/bin, and in the standard Debian package you can find it in /usr/bin. So "npm -v" still says it's an old version, altough you successfully put a new one to /usr/local/bin.
Debian and Ubuntu users can find a solution to stay with up-to-date packages here (see "Installation instructions"): https://github.com/nodesource/distributions
Hi, I am super eager to try out your implementation.
I've been having issues trying to install your project on my raspberry pi. I first installed
npm
,node
, and followed your installation instructions at the top.1) Your step #2, I can't even run that on my pi, it just errors out stating that it can't find this repo. 2) If I git clone your repo, then
cd
into it, then runnpm install
I receive an error installing.Here is the log that is displayed in my terminal. https://gist.github.com/reidcooper/cc0510a1932753401177173fbfe6486e