{"id":23982,"date":"2021-08-30T10:35:50","date_gmt":"2021-08-30T14:35:50","guid":{"rendered":"https:\/\/plumrocket.com\/docs\/?p=23982"},"modified":"2022-04-20T10:37:41","modified_gmt":"2022-04-20T14:37:41","slug":"fatal-error-interface-ampprojectoptimizertransformer-not-found","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found","title":{"rendered":"Fatal Error: Interface &#8216;AmpProject\\Optimizer\\Transformer&#8217; not found"},"content":{"rendered":"\n<p><strong>Error messages:<\/strong> <\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Fatal error: Interface &#8216;AmpProject\\Optimizer\\Transformer&#8217; not found in app\/code\/Plumrocket\/AmpComponent\/Model\/RemoveUnusedExtensionsTransformer.php.<\/p><\/blockquote>\n\n\n\n<p>or<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>Exception (ReflectionException): Class AmpProject\\Optimizer\\ErrorCollectionFactory does not exist<\/p><\/blockquote>\n\n\n\n<h2 id=\"h-issue-description\">Issue Description<\/h2>\n\n\n\n<p>Most likely, you are experiencing this fatal error after installing the <a href=\"\/magento-amp\">AMP extension<\/a> via FTP and running <code>bin\/magento setup:di:compile<\/code>. <\/p>\n\n\n\n<p>However, running this command is not enough to complete the installation. Please make sure to follow our <a href=\"\/docs\/magento-amp\/v3\/installation\">AMP Installation<\/a> or <a href=\"\/docs\/magento-amp\/v3\/upgrading\">Upgrading<\/a> guide so that you don\u2019t miss any required steps.&nbsp;<\/p>\n\n\n\n<p>In this case, you probably missed installing the AMP Toolbox, which is a crucial and required tool for the AMP extension to work properly. It helps increase Core Web Vitals score on AMP pages and convert CMS content to AMP HTML format.<\/p>\n\n\n\n<h2 id=\"h-solution-1-using-composer\">Solution 1 (using Composer)<\/h2>\n\n\n\n<p>It is likely that you have not installed all the composer packages, so follow the next steps to fix it.<\/p>\n\n\n\n<h3 id=\"h-step-1\">Step 1<\/h3>\n\n\n\n<p>Run the following command to install the required composer <a href=\"https:\/\/packagist.org\/packages\/ampproject\/amp-toolbox\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">AMP Toolbox for PHP<\/a> and <a href=\"https:\/\/packagist.org\/packages\/google\/recaptcha\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google reCAPTCHA<\/a> packages:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">composer require ampproject\/amp-toolbox ^0.9\ncomposer require google\/recaptcha ^1.2<\/code><\/pre><\/div>\n\n\n\n<h3 id=\"h-step-2-optional\">Step 2 (optional)<\/h3>\n\n\n\n<p>We also recommend you to install the <a href=\"https:\/\/github.com\/rosell-dk\/webp-convert\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">WebP Convert composer package<\/a> for the built-in support of WebP:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">composer require rosell-dk\/webp-convert<\/code><\/pre><\/div>\n\n\n\n<h2 id=\"h-solution-2-using-ftp\">Solution 2 (using FTP)<\/h2>\n\n\n\n<p>If you cannot use Composer to install the missing library, you should follow the next steps:<\/p>\n\n\n\n<ol><li>Go to the Magento root directory<\/li><li>Download autoloader by running the\u00a0following command<\/li><\/ol>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">git clone https:\/\/github.com\/plumrocket\/amp-toolbox-php-loader.git lib\/internal\/Plumrocket\/AmpProject<\/code><\/pre><\/div>\n\n\n\n<ol start=\"3\"><li>Download AMP Toolbox for PHP:<\/li><\/ol>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-bash\">git clone https:\/\/github.com\/ampproject\/amp-toolbox-php.git lib\/internal\/Plumrocket\/AmpProject\/amp-toolbox-php<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error messages: Fatal error: Interface &#8216;AmpProject\\Optimizer\\Transformer&#8217; not found in app\/code\/Plumrocket\/AmpComponent\/Model\/RemoveUnusedExtensionsTransformer.php. or Exception (ReflectionException): Class AmpProject\\Optimizer\\ErrorCollectionFactory does not exist Issue Description Most likely, you are experiencing this fatal error after installing the AMP extension via FTP and running bin\/magento setup:di:compile. However, running this command is not enough to complete the installation. Please make sure to follow &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fatal Error: Interface &#8216;AmpProject\\Optimizer\\Transformer&#8217; not found&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[106],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fatal Error: Interface &#039;AmpProject\\Optimizer\\Transformer&#039; not found - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"Error messages: Fatal error: Interface &#039;AmpProjectOptimizerTransformer&#039; not found in\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fatal Error: Interface &#039;AmpProject\\Optimizer\\Transformer&#039; not found\" \/>\n<meta property=\"og:description\" content=\"Error messages: Fatal error: Interface &#039;AmpProject\\Optimizer\\Transformer&#039; not found in\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-30T14:35:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-20T14:37:41+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Fatal Error: Interface 'AmpProject\\Optimizer\\Transformer' not found - Plumrocket Documentation","description":"Error messages: Fatal error: Interface 'AmpProjectOptimizerTransformer' not found in","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found","og_locale":"en_US","og_type":"article","og_title":"Fatal Error: Interface 'AmpProject\\Optimizer\\Transformer' not found","og_description":"Error messages: Fatal error: Interface 'AmpProject\\Optimizer\\Transformer' not found in","og_url":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found","og_site_name":"Plumrocket Documentation","article_published_time":"2021-08-30T14:35:50+00:00","article_modified_time":"2022-04-20T14:37:41+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found","name":"Fatal Error: Interface 'AmpProject\\Optimizer\\Transformer' not found - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2021-08-30T14:35:50+00:00","dateModified":"2022-04-20T14:37:41+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"description":"Error messages: Fatal error: Interface 'AmpProject\\Optimizer\\Transformer' not found in","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting\/amp-optimizer-not-found#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 AMP","item":"https:\/\/plumrocket.com\/magento-amp"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-amp"},{"@type":"ListItem","position":4,"name":"v3","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3"},{"@type":"ListItem","position":5,"name":"Troubleshooting","item":"https:\/\/plumrocket.com\/docs\/magento-amp\/v3\/troubleshooting"},{"@type":"ListItem","position":6,"name":"Fatal Error: Interface &#8216;AmpProject\\Optimizer\\Transformer&#8217; not found"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23982"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=23982"}],"version-history":[{"count":12,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23982\/revisions"}],"predecessor-version":[{"id":25498,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/23982\/revisions\/25498"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=23982"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=23982"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=23982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}