I installed the Font Awesome module with composer and enabled the module:
composer require drupal/fontawesome
drush en fontawesome -y
drush crWhen I try using the drush command to download the library I get an error:
drush fa-download
The drush command 'fa-download' could not be found. Run `drush cache-clear drush` to clear the commandfile cache if you have installed new extensions.
After running cache-clear I still get the error message. I'm using drush version 8.1.16 on Drupal 8.6.3.
When I manually download the fa library everythng works as expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | fontawesome-2745741-4.patch | 467 bytes | truls1502 |
Comments
Comment #2
daniel.moberly commentedAre you calling the command from the web root? Running this command on a fresh install for me properly downloads the library.
Comment #3
lowfidelityYes, I'm running drush from web root in the above example. I can use all other drush commands from this directory without any problems. It just looks like drush does not recognize the fa-download command. Cache was rebuilt.
I also tried the same on a fresh install, but here with another Drush and Drupal (8.6.x-dev) version:
With this combination I get another problem. After installing the module with composer I can successfully execute drush fa-download (or fa:download). The library is downloaded but I get the error "failed to open dir: No such file or directory. Here's what I'm doing:
At this point no libraries directory exists in my web root.
After this the directory ./libraries/fontawesome exists, but it also contains another directory fontawesome-free-5.3.1-web. This directory contains all files of the fontawesome library.
Note, that the error message states fontawesome-free-5.5.0-web and the directory that was created is fontawesome-free-5.3.1-web.
fontawesome.libraries.yml refers to version 5.3.1:
Comment #4
truls1502Added patch and does it works with the patch?
Comment #5
daniel.moberly commentedGood catch. I think the patch should fix the problem and it should be applied whether it resolves or not.
Comment #6
lowfidelityYes, fixes the problem I had on the fresh install mentioned in #3.
Haven't tried on the site mentioned in #1 but I'm pretty sure, this patch won't fix the initial issue. Also a reinstall of the module doesn't fix the problem on the other site, which is also "pretty fresh", just a few contrib modules installed so far.
Comment #7
truls1502Sure it should be applied whether this current issue is resolved or not.
However, before to commit, I would like to know if the patch is solving the @paper-boy regarding this current issue? Do you, @paper-boy, mind to test with the patch from #4 and let us know if it solve your Drush command? :)
Comment #8
lowfidelityApplied the patch on the site from #1. Does not fix the problem.
But as mentioned above, the patch from #4 fixes the problem described in #3 on a fresh install with newer drush version.
Might this be a compatibility issue with older drush version?
Comment #9
daniel.moberly commentedAh, yes. Currently Fontawesome only supports Drush 9.
Let's open a child issue for adding Drush 8 support and get this one committed.
Comment #11
daniel.moberly commentedAdded child issue #3013493: Support Drush 8 in Font Awesome