{"id":1146,"date":"2020-07-29T10:21:31","date_gmt":"2020-07-29T10:21:31","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/07\/29\/solved-syntax-error-while-installing-magento-2-4\/"},"modified":"2025-09-01T11:31:04","modified_gmt":"2025-09-01T06:01:04","slug":"solved-syntax-error-while-installing-magento-2-4","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/solved-syntax-error-while-installing-magento-2-4\/","title":{"rendered":"[Solved] Syntax Error &#8211;  Unexpected &#8216;)&#8217;  While Installing Magento 2.4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The latest&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-4-release\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2.4<\/a>&nbsp;is released on July 28\u201920.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">No doubt, any store owner will be prompted to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/download-magento\/\" target=\"_blank\" rel=\"noreferrer noopener\">download Magento 2.4.0<\/a>&nbsp;and install it to leverage the latest features like:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/meetanshi.com\/blog\/setup-two-factor-authentication-in-magento-2-4\/\" target=\"_blank\" rel=\"noreferrer noopener\">2FA in Magento admin<\/a><\/li>\n\n\n\n<li>Seller assisted shopping<\/li>\n\n\n\n<li>New media gallery<\/li>\n\n\n\n<li>In-store pickup<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Not forgetting the 98 new features, 68 bug fixes, 50 security changes, and Php 7.4 support!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, merchants are facing a syntax error \u2013 Unexpected \u2018)\u2019 while installing Magento 2.4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Developers at Meetanshi immediately jumped on this error and here\u2019s the solution:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution for Syntax Error \u2013 Unexpected \u2018)\u2019 while installing Magento 2.4:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Screenshot-at-July-29th-2020-1.25.14-pm.jpg\" alt=\"Syntax Error - Unexpected ')' while installing Magento 2.4\" class=\"wp-image-9885\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you witness the above error, open setupsrcMagentoSetupModule.php file<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At line number 81, remove the \u201c,\u201d&nbsp; at last.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Your getConfig function code is as below:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">public function getConfig()\n{\n    \/\/ phpcs:disable\n    $result = array_merge_recursive(\n        include __DIR__ . '\/..\/..\/..\/config\/module.config.php',\n        include __DIR__ . '\/..\/..\/..\/config\/router.config.php',\n        include __DIR__ . '\/..\/..\/..\/config\/di.config.php',\n        include __DIR__ . '\/..\/..\/..\/config\/states.install.config.php',\n        include __DIR__ . '\/..\/..\/..\/config\/languages.config.php'\n    );\n    \/\/ phpcs:enable\n    return $result;\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can simply skip this error and opt for Meetanshi\u2019s\u00a0<a href=\"https:\/\/meetanshi.com\/magento-upgrade-service\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Upgrade <\/a><a href=\"https:\/\/meetanshi.com\/magento-upgrade-service.html\" target=\"_blank\" rel=\"noreferrer noopener\">Service<\/a>\u00a0to upgrade your store to the latest\u00a0<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-4-3-release\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2.4.3<\/a>\u00a0version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please share the solution with the Magento community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The latest&nbsp;Magento 2.4&nbsp;is released on July 28\u201920. No doubt, any store owner will be prompted to&nbsp;download Magento 2.4.0&nbsp;and install it to leverage the latest features&#8230;<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1146","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1146"}],"version-history":[{"count":4,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1146\/revisions"}],"predecessor-version":[{"id":21353,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1146\/revisions\/21353"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}