heisters / node-omxplayer-sync

Synchronize omxplayer instances over a network using OSC
15 stars 5 forks source link

Errors when installing on pi #2

Closed yurikleb closed 7 years ago

yurikleb commented 8 years ago

npm-debug-log.txt

Hi heisters, I'm getting the following errors when trying to install this on the pi: I'm running a 'sudo npm install' command when inside the 'node-omxplayer-sync' library. am I doing something wrong? attaching the npm-debug.log

npm WARN optional Skipping failed optional dependency /browserify-middleware/watchify/chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14 npm WARN omxplayer-sync@1.0.0 No repository field. npm ERR! Linux 4.4.11-v7+ npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.3.0 npm ERR! npm v3.10.3 npm ERR! path /home/pi/ts-tests/node-omxplayer-sync/node_modules/.staging/minimist-87fdf6c3 npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename

npm ERR! enoent ENOENT: no such file or directory, rename '/home/pi/ts-tests/node-omxplayer-sync/node_modules/.staging/minimist-87fdf6c3' -> '/home/pi/ts-tests/node-omxplayer-sync/node_modules/serialport/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist' npm ERR! enoent ENOENT: no such file or directory, rename '/home/pi/ts-tests/node-omxplayer-sync/node_modules/.staging/minimist-87fdf6c3' -> '/home/pi/ts-tests/node-omxplayer-sync/node_modules/serialport/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent

npm ERR! Please include the following file with any support request: npm ERR! /home/pi/ts-tests/node-omxplayer-sync/npm-debug.log

thanks!

heisters commented 8 years ago

Not compatible with your operating system or architecture: fsevents@1.0.14

What version of Pi are you on?

yurikleb commented 8 years ago

I'm using Pi 2 Model B Linux pi02 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux Thanks!

heisters commented 8 years ago

Ok, that should work.

Looks like a permissions issue in how you're running npm? I wouldn't use sudo to call npm install because you're just installing the modules to the local directory, and your user account should have write access to that directory.

If you're up for it, I would recommend using ansible to install and manage node-omxplayer-sync. It will ensure you're doing everything in the expected way. If you're familiar with ansible, you can at least use it as a reference for how I've done things in the past.

yurikleb commented 8 years ago

Hey Heisters, Im trying to follow the instructions on the 'node-omxplayer-sync-devops' README, but they are bit confusing.

I'm using my Mac as the control machine so Ansible is running on it. Should I be installing Ansible on the Pies? My first guess is no?

Basically I got stuck in the 'USAGE' paragraph of your instructions:

git clone https://github.com/heisters/node-omxplayer-sync-devops.git should this be cloned to the control machine (Mac) only or the pies as well?

cd ansible-pi what is this folder?should I create it?

git checkout video-cluster I can't see this branch anywhere in your gits

Appreciate your help!

yurikleb commented 8 years ago

I Also tried running npm install without sudo as you suggested but just got a bunch of new errors npm-debug.txt

heisters commented 7 years ago

Hey, sorry I lost track of this issue. Are you still having trouble?

I guess the README for the ansible repo is out of date. I think this should work:

git clone https://github.com/heisters/node-omxplayer-sync-devops.git
cd node-omxplayer-sync-devops
cp hosts.example hosts
# etc.

If you want to try ansible, I suggest reading up on it a little bit. But yes, you have the right idea. You install ansible on your control machine (I use my laptop), clone the repo, edit the hosts file, and then run ansible and it uses SSH to install and configure everything on the pis listed in hosts.

It looks like npm is failing on installing pty.js, and I can't tell exactly why. What OS are you using? I think I was using Raspbian Jesse, but it's been a while since I've worked on this project. It could also be that you're using a different version of Node or NPM, and that's causing the issue.

yurikleb commented 7 years ago

Hey thanks! I ended up using oddroids + android os for the current project. but will give it another try if I go for pi+omx in the future! Thanks!