How to fix the «The "autoload" field is not set or empty in the "composer.json" file; please verify the archive.» issue for a Magento Marketplace metapackage?


(Dmitry Fedyuk) #1


My composer.json file:

The official Magento documentation says:

Metapackages allow you to group an extension that consists of multiple packages into a cohesive unit.
This works exactly as described in standard composer.json documentation.
If you have an extension that uses more than one package you must use a metapackage as the root package. Otherwise you should not use metapackage.
A metapackage that you submit to Magento Marketplace should be a .zip file containing only the metapackage composer.json file.


The official composer.json example of a metapackage does not contain an autoload field:


[AlphaCommerceHub] Magento Marketplace submission process
(Dmitry Fedyuk) #2

The previous time, it took 40 days for Magento Marketplace team to respond to a contact form message.
Let’s see will it be faster now.



(Dmitry Fedyuk) #3

I have got a response from Magento:

It appears that the issue is with the type field in the composer file.
According to the web page provided, the type is listed as magento2-module instead of metapackage as stated in the documentation.
The reason for autoload error is due to incorrect labeling in the type field.