3

I am creating a magento 2 module that requires a 3rd party library, but have no idea how do I install it with the module.

This is my module's composer.json file.

{
    "name": "namespace/name",
    "description":"N/A",
    "require": {
        "vandor/library": "^2.2"        
    },
    "type": "magento2-module",
    "version":"1.0.0",
    "license":[
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "psr-4": { "Namespace\\Modulename\\": "" },
        "files": [ "registration.php" ]
    }
}

When I run the command composer install, it installed the library in the module's directory.

I need to install it in the <magento_root>/[lib or vendor (whichever is correct)], please note that I need to upload this extension to the marketplace.

0

0

Browse other questions tagged or ask your own question.