django-bower
django-bower copied to clipboard
Error when arguments are passed to `manage.py bower install`
This looks to be a bug in management/commands/bower.py
; BaseBowerCommand._install
is only used when there are no arguments.
# myapp/settings.py
BOWER_INSTALLED_APPS = (
'jquery',
)
$ python manage.py bower install
bower jquery#* cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#* validate 2.1.4 against git://github.com/jquery/jquery.git#*
bower jquery#>=1.2 cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#>=1.2 validate 2.1.4 against git://github.com/jquery/jquery.git#>=1.2
bower jquery#>=1.6 cached git://github.com/jquery/jquery.git#2.1.4
bower jquery#>=1.6 validate 2.1.4 against git://github.com/jquery/jquery.git#>=1.6
$ python manage.py bower install -- --allow-root
bower ENOENT No bower.json present
I'm experiencing the same issue.
@mik3y Do you know a workaround for now by chance?
Same issue for me.
For the moment, I think I will simply create a bower.json and run bower manually.... might remove that django-bower in the next months though.
@mik3y I'm having the same problem. Is there any status on this?
@nvbn This whole thing (passing flags to bower with -- --flag-name
is documented, but doesn't seem to be working? Was there a time that it was working and eventually broke?
Ran into the same problem, and switching my command fixed the issue:
./manage.py bower_install -- --allow-root --no-input
works
whereas ./manage.py bower install -- --allow-root --no-input
does not work.
(note the underscored bower_install
in the working version)
I see there's a few Issues discussing the confusion between these commands: #17 and #44
yeah, bower_install. Thanks @pydolan
using bower_install worked for me as well.
not working:
bower ESUDO Cannot be run with sudo
python manage.py bower_install --allow-root
worked for me. In addition, I used BOWER_COMPONENTS_ROOT = os.path.join(str(ROOT_DIR('project_name')), 'static', 'components')
to save the files in project_name/static/components
.
Hope that helps.