Problem Description: I have created two private repositories in github under same user name. Each repository contains different modules. But while trying to install the package via composer throws error.
Repository 1 : Composer.json
{
"name": "xxx/module-abc",
"description": "N/A",
"type": "magento2-module",
"version": "1.0.0",
"autoload": {
"psr-4": { "VENDOR\\Abc\\": "" },
"files": [ "registration.php" ]
}
}
Repository 2: composer.json
{
"name": "xxx/module-psr",
"description": "N/A",
"type": "magento2-module",
"version": "1.1.0",
"require": {
"xxx/module-abc": "*"
},
"autoload": {
"psr-4": { "VENDOR\\Psr\\": "" },
"files": [ "registration.php" ]
}
}
While tring to install to my instance , I have added below code in my Magento root's composer.json composer.json
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
},{"type": "git",
"url": "https://github.com/xxx/module-psr"}
],
Running the below command in terminal composer require xxx/module-psr:dev-master
It throws below error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for xxx/module-psr dev-master -> satisfiable by xxx/module-psr[dev-master].
- xxx/module-psr dev-master requires xxx/module-abc * -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
Please provide me a solution to install the module via composer
psr-4
tag, vendor name and module should be capital.(Potential causes:- A typo in the package name) – Pawan Feb 28 '19 at 5:17