[Solved] Syntax Error – Unexpected ‘)’ While Installing Magento 2.4

The latest Magento 2.4 is released on July 28’20.

No doubt, any store owner will be prompted to download Magento 2.4.0 and install it to leverage the latest features like:

Not forgetting the 98 new features, 68 bug fixes, 50 security changes, and Php 7.4 support!

However, merchants are facing a syntax error – Unexpected ‘)’ while installing Magento 2.4.

Developers at Meetanshi immediately jumped on this error and here’s the solution:

Solution for Syntax Error – Unexpected ‘)’ while installing Magento 2.4:

Syntax Error - Unexpected ')' while installing Magento 2.4

If you witness the above error, open setup\src\Magento\Setup\Module.php file

At line number 81, remove the “,”  at last.

Your getConfig function code is as below:

That’s it.

Any doubts can be mentioned in the Comments section below.

You can simply skip this error and opt for Meetanshi’s Magento 2 Upgrade Service to upgrade your store to the latest Magento 2.4.3 version.

Please share the solution with the Magento community via social media.

Thank you.

(based on 19 Reviews)
[Solved] Syntax Error –  Unexpected ‘)’  While Installing Magento 2.4Author Magento Badge

Jignesh Parmar

An expert in his field, Jignesh is the team leader at Meetanshi and a certified Magento developer. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.


  • Santosh

    I was also getting the same error : Parse error: syntax error, unexpected ‘)’ in C:\xampp\htdocs\magento2\setup\src\Magento\Setup\Module.php on line 82.
    As suggested, At line number 81, removed the “,” at last. but
    Install option is not visible – Agree and Setup option is not visible.
    Please suggest how to resolve the issue.

  • Phillips

    Damn, you are just awesome this error has got me stuck for weeks now. Thanks for your expertise

Leave a Reply

Your email address will not be published. Required fields are marked *