Getting the following error when running composer install
or composer update
?
[InvalidArgumentException]
Unknown downloader type: xz. Available types: git, svn, hg, perforce, zip, rar, tar, g zip, phar, file.
The main problem could be that you’re using an outdated version of composer.
How To Check Composer Version
1. Run composer diagnose
2. If you’re using an outdated version, it will advice you to run composer self-update
.
How To Update Composer
1. Run composer self-update
2. Make sure to run composer diagnose
again (even after the update) to check if you really have the newest version installed.
Problem Solved
Now run composer install
or composer update
, and the command should complete without the error anymore.
Leave a Reply