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.
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.
Any help would be greatly appreciated.
Have you tried not running it as root? Haha.
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.
If I run as any other user the update does not happen. My platform is Ubuntu 14.04 Server. When I run as anothere user this is the output :
user@ubuntu:/var/www/app$ ionic lib update
bower ionic#1.0.0-beta.14 not-cached git://github.com/driftyco/ionic-bower.git#1.0.0-beta.14
bower ionic#1.0.0-beta.14 resolve git://github.com/driftyco/ionic-bower.git#1.0.0-beta.14
bower ionic#1.0.0-beta.14 download https://github.com/driftyco/ionic-bower/archive/v1.0.0-beta.14.tar.gz
bower ionic#1.0.0-beta.14 extract archive.tar.gz
bower ionic#1.0.0-beta.14 invalid-meta ionic is missing "ignore" entry in bower.json
bower ionic#1.0.0-beta.14 resolved git://github.com/driftyco/ionic-bower.git#1.0.0-beta.14
user@ubuntu:/var/www/app$ ionic lib
Local Ionic version: 1.0.0-beta.14 (/var/www/app/www/lib/ionic/bower.json)
Latest Ionic version: 1.0.0-rc.0 (released 2015-03-05)
* Local version is out of date
As you can see its still out of date after running the command as another user.
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.
Seems a few things changes from beta 14 to rc1. In the end I had to use this method : How to update the Ionic in the existing project?