andrewn / neue-radio

Neue Radio: Prototype connected object using web technologies
10 stars 6 forks source link

Installation - physical fails on pi #90

Closed libbymiller closed 6 years ago

libbymiller commented 6 years ago

using this on the pi: curl https://raw.githubusercontent.com/andrewn/neue-radio/master/deployment/provision | sudo bash

Update the following: debug, downloader, manager, physical, rfid, setup, speech, radio, websocket

Completed: debug
Completed: websocket
Completed: rfid
Completed: radio
Completed: speech
Completed: setup
Completed: manager
Completed: downloader
Error installing/updating: physical

1 failure.

and also npm install-all on the mac.

libbymiller commented 6 years ago

On the Pi, this means that installation doesn't complete.

pixelblend commented 6 years ago

This might be solved by #92

If you still have the pi in this state, could you run this and see what you get?

cd /opt/radiodan/rde/services/physical && npm install

libbymiller commented 6 years ago

npm WARN physical@0.0.1 No description
npm WARN physical@0.0.1 No repository field.

npm ERR! path /opt/radiodan/rde/services/physical/node_modules/.staging
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall rmdir
npm ERR! Error: EACCES: permission denied, rmdir '/opt/radiodan/rde/services/physical/node_modules/.staging'
npm ERR!  { Error: EACCES: permission denied, rmdir '/opt/radiodan/rde/services/physical/node_modules/.staging'
npm ERR!   stack: 'Error: EACCES: permission denied, rmdir \'/opt/radiodan/rde/services/physical/node_modules/.staging\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rmdir',
npm ERR!   path: '/opt/radiodan/rde/services/physical/node_modules/.staging' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pi/.npm/_logs/2018-03-28T10_50_46_884Z-debug.log```
andrewn commented 6 years ago

I just came across this issue too and it seems to be a permissions issue.

I think the provision script, which acts as root should chmod -R pi:pi /opt/radiodan to the pi user?

andrewn commented 6 years ago

As described in #106 this was actually an issue with NPM being run as root without the --unsafe-perm flag. The PR fixes it!