6

I have big problem and don't know how i made that mistake...

i wrote

composer require searchanise/search-autocomplete and

Could not find a matching version of package searchanise/search-autocomplete. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

This is composer.json

{
    "name": "searchanise/search-autocomplete",
    "description": "Search Autocomplete + Search Suggest",
    "type": "magento2-module",
    "version": "1.0.4",
    "homepage": "http://www.searchanise.com",
    "authors": [
        {
            "name": "Simtech",
            "email": "sales@searchanise.com"
        }
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Searchanise\\SearchAutocomplete\\": ""
        }
    },
    "repositories": [
    {
      "type": "composer",
      "url": "https://repo.magento.com/"
    }
  ]

}

Anyone can help me? :)

Thanks

1
  • 1
    I tried installing the searchanise/search-autocomplete module in a blank Magento 2 installation (running 2.2.5) and got an error saying the searchanise/search-autocomplete could not be found in any version You have posted the composer.json for the searchanise/search-autocomplete module somehow, so it seems you have access to the module's source code. I think the issue may be in the module not being hosted on the repo.magento.com or public packagist repositories. You should either set up a private local repository and pull the module from there or there's more to this story. Dec 11, 2018 at 2:54

2 Answers 2

8

I had the same problem (also with this extension). For anyone who is facing an issue with installing any Magento Marketplace extension with Composer: please check your auth.json for the correct credentials to connect with the Marketplace. The error about the version is misleading.

Please see the given answer here: https://community.magento.com/t5/Installing-Extensions/Problems-installing-extension-from-Marketplace/m-p/92732/highlight/true#M985

{
   "http-basic": {
      "repo.magento.com": {
         "username": "<marketplace-public-key>",
         "password": "<marketplace-private-key>" 
      }
   }
}
3
  • Where to find the auth.json?
    – Black
    May 6, 2021 at 8:43
  • @Black the auth.json file should be in the same directory as your composer.json file. If it is not there, you can create it. Please see https://getcomposer.org/doc/articles/authentication-for-private-packages.md for more information.
    – MrPaulsky
    May 6, 2021 at 10:18
  • 1
    Thanks @MrPaulsky. I changed auth.json.sample to auth.json and add username, password. it helped me fix this: Could not find a matching version of package stripe/stripe-payments. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
    – River
    Jun 17, 2021 at 4:18
2

Add in 2 lines your composer.json file "minimum-stability": "dev", "prefer-stable": true Do not forget to release your project from github https://prnt.sc/qigw57 Register or login on https://packagist.org/ and connect your git account. after login, press the submit button from the header and enter your git Repository URL. after added successfully your repository you can install your module by composer require searchanise/search-autocomplete I'll be pleased if it helps you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.