cancel
Showing results for 
Search instead for 
Did you mean: 

Package vendor/module-name exists in composer repo (https://repo.packagist.org)

Package vendor/module-name exists in composer repo (https://repo.packagist.org)

When you install some new extension package in Magento 2 via the composer you can get an error:

[InvalidArgumentException] 
Package vendor/module-name exists in composer repo (https://repo.packagist.org) and composer repo (https://repo.magento.com) which has a higher repository priority. The packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
1 REPLY 1

Re: Package vendor/module-name exists in composer repo (https://repo.packagist.org)

1. Open composer.json file in your Magento 2 root directory.

2. Find the "repositories" section.

3. Replace the following code:
"type": "composer",
"url": "https://repo.magento.com/"
with this one

"type": "composer",
"url": "https://repo.magento.com/",
"canonical": false

4. Save the changes and try to install Magento 2 extension again.

If issue solved, Click Kudos & Accept as Solution.
LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool