cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to open file composer.json. Please verify the archive

SOLVED

Failed to open file composer.json. Please verify the archive

Hey, follow developers, I am new in Magento2 module development and I have successfully managed to build a custom courier module that hits a third party API to generate quotations and creating client's bookings.

 

Now, my is issue is, when I go to Magento Technical Submission page to attach my module for review, I get an error: Failed to open file composer.json. Please verify the archive.

 

Failed to open file composer.json. Please verify the archiveFailed to open file composer.json. Please verify the archive

This is my composer.json code:

<pre>
{
    "name": "droppa-2020/droppashipping",
    "minimum-stability": "stable",
    "description": "Custom Droppa Shipping Module",
    "homepage": "https://github.com/jackmanamela/Magento-Droppa-Shipping-Plugin",
    "keywords": [
        "Magento 2",
        "Magento 2 Courier",
        "Magento 2 Shipping",
        "Courier",
        "Magento 2 extension free"
    ],
    "require": {
        "php": "~7.2.0||~7.3.0||~7.4.0",
        "magento/framework": "102.0.0",
        "magento/module-backend": "101.0.0",
        "magento/module-catalog": "103.0.0",
        "magento/module-config": "101.1.0",
        "magento/module-directory": "100.3.0",
        "magento/module-quote": "101.1.0",
        "magento/module-sales": "102.0.0",
        "magento/module-sales-rule": "101.1.0",
        "magento/module-shipping": "100.3.0",
        "magento/module-store": "101.0.0"
    },
    "type": "magento2-module",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Droppa-2020\\DroppaShipping\\": ""
        }
    },
    "authors": [
        {
            "name": "Jack Manamela",
            "email": "jackm@droppa.co.za",
            "role": "Developer"
        }
    ],
    "support": {
        "email": "itsupport@droppa.co.za"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        {
            "type": "git",
            "url": "https://github.com/jackmanamela/magento-droppa-shipping-plugin.git"
        }
    ],
    "archive": {
        "name": "droppashipping",
        "directory": "dist",
        "format": "zip",
        "skip-dev": false
    },
    "version": "1.0.0"
}
</pre>

May I please get some assistance in regards to my current error! Thanks in advanced.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Failed to open file composer.json. Please verify the archive

Hello @Jack ,

 

Trust you are doing well!

 

Make sure your module and composer files are placed in the root location of your archive file.

Assume you have developed a module below the app/code/Vendor/Module.

 

Create a composer file
Go to app/code/Vendor/Module and create the following composer.json file:

 

{
"name": "vendor/module",
"description": "Description of your Magento 2 module",
"type": "magento2-module",
"version": "0.1.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/framework": "~100.0.4"
},
"authors": [
{
"name": "Firstname Lastname",
"email": "email@address.com",
"homepage": "https://www.store.com/",
"role": "Developer"
}
],
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"Vendor\Module\": ""
}
}
}

 

Check out this solution.

 

Hope this helps you,

Problem solved? Hit the Kudos button and "Accept it as Solution"

 

View solution in original post

2 REPLIES 2

Re: Failed to open file composer.json. Please verify the archive

Hello @Jack ,

 

Trust you are doing well!

 

Make sure your module and composer files are placed in the root location of your archive file.

Assume you have developed a module below the app/code/Vendor/Module.

 

Create a composer file
Go to app/code/Vendor/Module and create the following composer.json file:

 

{
"name": "vendor/module",
"description": "Description of your Magento 2 module",
"type": "magento2-module",
"version": "0.1.0",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"php": "~5.5.0|~5.6.0|~7.0.0",
"magento/framework": "~100.0.4"
},
"authors": [
{
"name": "Firstname Lastname",
"email": "email@address.com",
"homepage": "https://www.store.com/",
"role": "Developer"
}
],
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"Vendor\Module\": ""
}
}
}

 

Check out this solution.

 

Hope this helps you,

Problem solved? Hit the Kudos button and "Accept it as Solution"

 

View solution in original post

Re: Failed to open file composer.json. Please verify the archive

Thank you kindly. Smiley Very Happy