WiringPi / WiringPi-Node

Node.js bindings to wiringPi
334 stars 94 forks source link

ERR : wiringPiSetup: Must be root. (Did you forget sudo?) #32

Closed trojanspike closed 8 years ago

trojanspike commented 8 years ago

Isn't it best practice to not use root ? User permissions should be enough , also I'm using nvm Node Version Manager , I don't give root node software.

nekuz0r commented 8 years ago

Hi there is no issue here, root is required by most of working mode (see setup documentation). If you don't want to give root access to your application use mode sys.

trojanspike commented 8 years ago

sys does nothing to help - I guess I'll have to use sudo until I get a better solution . My temp solution for anyone else having an issue when also using nodeVerionManager

#!/usr/bin/env bash
#~/bin/sudo-node :: chmod +x
sudo $(which node) $@
$ sudo-node pwm.js