marketplace, I am validating my extension but i have two extentions in one directory

Here is Zip directory structure is:

Module Zip folder


getting error:

More than one top-level directory detected, number of directories = 2. Top level directory expected to be the module directory.

enter image description here Can you please provide the solution for this?



These modules -- are they related or dependent to each other? Are they of the same module type -- ie. magento2-theme, magento2-module, magento2-language?

Do you have your vendor name configured in Magento Company profile?

Vendor Name

If all these are yes, then put the modules within a directory that matches your vendor name:


Here is good documentation on composer directory structure, naming, magento package types, etc..: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/composer-integration.html

Documentation for extension repository structure: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/prepare/ext-repo-structure.html


I'm wondering if validate_m2_package.php is old and has not been updated to support the multiple package structure. The last update was in April 2017 on this validation tool.

| improve this answer | |
  • I have two modules with same type is 'magento2-module'. How to make the package for market place. I am struggling. I am doing first type for two modules. I didn't get how to do this?. – Shomita Sep 11 '19 at 7:18
  • Do you not have a vendor name configured with Magento? If you don't, then focus on that to start. If you do, then try submitting one module first. – df2k2 Sep 11 '19 at 7:28
  • Updated my comment with module directory structure. need to submit both. If I validate only mkt then it works and validation is passed. But with both is getting error – Shomita Sep 11 '19 at 7:30

Update your vendor name first in the company profile then only you can continue to validate the extension

| improve this answer | |

The Magento Marketplace is designed so that each package file is exactly that: one package.

That means we can't just make up our own packaging scheme to mish-mash together hybridized franken-extensions into the same zipfile, and expect them to work with the Marketplace's automated testing toolchain. It wouldn't have any idea how to test any of that! So we have to stick to the packaging specification.

But not to worry: if we want to sell two separate extensions as a single package, there are ways to do this for Magento 2!

Option 1: Primary package with shared package dependency

Upload the "less significant" of the two (say, the one in your folder "Mkt") as a shared package (https://docs.magento.com/marketplace/user_guide/sellers/shared-packages.html), which is the Magento equivalent of a "library". This shared package will not be visible on the Marketplace store for purchase separately.

Upload the other (the one in your folder "Abandon") as a regular extension, and have it require the shared package. Then when people buy the "Abandon" extension, composer will automatically download and install the "Mkt" dependency for them.

Option 2: Metapackage that includes both other packages

First, upload both extensions as shared packages.

Then, create a "metapackage" (https://marketplacesupport.magento.com/hc/en-us/articles/360015982231-Metapackages) that is little more than a composer.json that requires both of those shared packages as a dependency. The shared packages will automatically be downloaded and installed by Composer when someone buys and installs the metapackage.

When you sell a package through Magento Marketplace, it automatically grants your customer access to download any of your shared packages that are marked as dependencies, too.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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