I cant get ‘ionic lib update’ to run as root. This is the output I get :
bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option
I cant tac on --allow-root as that’s a bower command and the ‘ionic lib update’ command does not pass that through to bower.
I also found something online saying that you can add ‘allow_root: true’ to the ‘app/config/config.yml’ file, but I cant seem to find anything like that in the folder structure of my app.
What platform are you on? You might want to figure out the permissions in the folder if that won’t let you. Doing something like “chown -R user:group yourappfolder” would do the trick, but you’ll want to make sure it’s for you.
What does ls -l /var/www/app/www/ give you? Did you maybe initially start your ionic project as root? That could make the subsequent attempts to update fail. As @nnnnnorthhhhh said, you can chown the directories so that you are the owner.
If you don’t think it’s a problem with permissions feel free to open a new issue with as much info as possible (and ideally steps to reproduce) at https://github.com/driftyco/ionic-cli.