2

Can anyone please tell me the reason why module go to Vendor directory when install using composer?
Please refer me a link for this reason.

In my custom extension, I am using this code in my composer file.

{

"name": "vendor/module",
"description": "Magento 2 Shipping Rates",
"type": "magento2-module",
"version": "1.0.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {},
"authors": [
{
  "name": "ABC",
  "email": "[email protected]",
  "homepage": "abc.com",
  "role": "Owner"
}
],
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
  "Vendor\\Module\\": ""
}
},
"minimum-stability": "dev",
"prefer-stable": true 
}

Also, I have configured Github and Packagist too.
But when I try to install my module using composer by using command

composer require vendor/module

I am getting this error message.

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package vendor/module * is satisfiable by vendor/module[dev-master] but these conflict with your requirements or minimum-stability.


Installation failed, reverting ./composer.json to its original content.
1
  • Have you tried installing this module on a clean Magento 2 install? Might be conflicting with existing code if you've got it stored in app/code.
    – Marisa
    May 29, 2019 at 18:29

1 Answer 1

1

In your github account have you pushed to master? Also what if you add a tag in git with label 1.0.0 and then push tag to master and for example and then try to do the following from within magento

composer require vendor/module:1.0.0

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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