0

I did the following command on the CLI of a Magento 2.1.15 installation:

php bin/magento setup:di:compile -vvv

The following exception occurred:

[RuntimeException]                                                
  Class Magento\Framework\Serialize\Serializer\Json does not exist 

And in deep:

Exception trace:
 () at /html/magento2/vendor/magento/framework/Code/Generator.php:115
 Magento\Framework\Code\Generator->generateClass() at /html/magento2/setup/src/Magento/Setup/Module/Di/Code/Generator.php:70
 Magento\Setup\Module\Di\Code\Generator->generateList() at /html/magento2/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Interception.php:100
 Magento\Setup\Module\Di\App\Task\Operation\Interception->doOperation() at /html/magento2/setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
 Magento\Setup\Module\Di\App\Task\Manager->process() at /html/magento2/setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:188
 Magento\Setup\Console\Command\DiCompileCommand->execute() at /html/magento2/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /html/magento2/vendor/magento/framework/Console/Cli.php:125
 Magento\Framework\Console\Cli->doRun() at /html/magento2/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /html/magento2/bin/magento:23

Now I would like to go hunting for the error, but the files all seem OK and I really do not know what to try next. Is there any idea?

3

This class wasn't available in earlier Magento versions (2.1.x), the class was added in 2.2.x. You are using 2.1.x and getting this error so that may be used in any custom extension. However, you can add this class if required, please follow below link for more details:

class magento\framework\serialize\serializer\json does not exist

1
  • Thanks, perfect! The error was caused by an extension. Now the problem is solved. Nov 30 '18 at 19:15

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.