RuntimeException: Can't create directory /opt/bitnami/apps/magento/htdocs/generated/code/Magento/Framework/Event/Invoker/InvokerDefault/. Class Magento\Framework\Event\Invoker\InvokerDefault\Interceptor generation error: The requested class did not generate properly, because the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only. in /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Code/Generator.php:135 Stack trace: #0 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...') #2 [internal function]: spl_autoload_call('Magento\\Framewo...') #3 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...') #4 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #5 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #6 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #7 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #8 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'invoker', 'Magento\\Framewo...') #9 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array) #10 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array) #11 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #12 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #13 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'eventManager', 'Magento\\Framewo...') #14 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Array) #15 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Framewo...', Array, Array) #16 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array) #17 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(233): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array) #18 /opt/bitnami/apps/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->createApplication('Magento\\Framewo...') #19 {main}