nvbn / django-bower

Easy way to use bower with your django project
https://django-bower.readthedocs.io/
518 stars 75 forks source link

Django Bower with Travis #42

Closed pawamoy closed 6 years ago

pawamoy commented 9 years ago

Hi,

I am not sure who is responsible for this, but django-bower does not work when using it on Travis.

echo "Y" | $ROOT/manage.py bower install

Traceback (most recent call last): File "/home/travis/build/Pawamoy/Genida/manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line utility.execute() File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/init.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(_args, _options.dict) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute output = self.handle(_args, _options) File "/home/travis/genida/local/lib/python2.7/site-packages/djangobower/management/commands/bower.py", line 12, in handle self._install([]) File "/home/travis/genida/local/lib/python2.7/site-packages/djangobower/management/base.py", line 21, in _install bower_adapter.install(settings.BOWER_INSTALLED_APPS, *args) File "/home/travis/genida/local/lib/python2.7/site-packages/djangobower/bower.py", line 37, in install self.call_bower(['install'] + list(options) + list(packages)) File "/home/travis/genida/local/lib/python2.7/site-packages/djangobower/bower.py", line 32, in call_bower cwd=self._components_root) File "/usr/lib/python2.7/subprocess.py", line 679, in init errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

Travis version of installed bower is 1.4.1.

Besides, when running ./manage.py collectstatic --noinput, it seems that the StaticFileFinder is looking for a directory called components inside the BOWER_COMPONENTS_ROOT, instead of bower_components. This can be easily fixed with a symbolic link, but still, I can't understand why it behaves differently on Travis...

Copying '/home/travis/build/Pawamoy/Genida/static/components' Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/init.py", line 385, in execute_from_command_line utility.execute() File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/init.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(_args, _options.dict) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute output = self.handle(_args, _options) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/management/base.py", line 533, in handle return self.handle_noargs(**options) File "/home/travis/genida/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle_noargs collected = self.collect() File "/home/travis/genida/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 107, in collect handler(path, prefixed_path, storage) File "/home/travis/genida/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 314, in copy_file with source_storage.open(path) as source_file: File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/files/storage.py", line 35, in open return self._open(name, mode) File "/home/travis/genida/local/lib/python2.7/site-packages/django/core/files/storage.py", line 172, in _open return File(open(self.path(name), mode)) IOError: [Errno 2] No such file or directory: u'/home/travis/build/Pawamoy/Genida/static/components' The command "python manage.py collectstatic --noinput" failed and exited with 1 during .

All of this is working just fine on my machine.

Does someone have any idea what is going on here :squirrel: ?

noahsark769 commented 9 years ago

Hey @Pawamoy, did you ever figure this out? looks like I'm having the same issue :/

I'm getting the same error with the components directory not found, even though I don't have a components directory or a bower_components directory for that matter

pawamoy commented 9 years ago

Hey @noahsark769 , no I never figured this out :/ If you manage to solve this, let me know :yellow_heart:

pawamoy commented 6 years ago

Bower is now deprecated in favor of Yarn, closing.