Problem
The Composer installation of an extension in Magento 2 fails.
The following error occurs:
Could not find package ... at any version for your minimum-stability ... Check the package spelling or your minimum-stability
Possible causes
Composer cannot find the sources for the package (Magento extension) you are trying to install. This can have several reasons:
- Composer does not know the correct repository to use (e.g. repo.magento.com).
- The package artifact (TGZ/ZIP) is not stored in the correct location.
- The TGZ or ZIP has been unpacked.
Solutions
- To add the repository repo.magento.com to your project, execute this command:
composer config repositories.<extension> vcs https://repo.magento.com
Replace the part <extension> with the actual name of the Magento module.
- Make sure to store the package artifact (TGZ/ZIP) in a directory that can be accessed by Composer.
- Do not unpack (unzip) the package. Just put the TGZ or ZIP file into the directory as is.
Please also follow this article, and check the extension's readme file for setup instructions.