Here is a Zend framework 3 error that you might get once or twice. It would look something like this;
Fatal error: Uncaught exception ‘Zend\ModuleManager\Exception\RuntimeException’ with message ‘Module (ModuleName) could not be initialized
Here is how to solve it.
- Make sure the module is present in project name/config/modules.config.php. For example
return [
…’Application’,
‘ModuleNameOne’,
‘ModuleNameTwo’
];
- Check that the module is in the composer.json file. For example
“autoload”:
{
“psr-4”:
{
{
“psr-4”:
{
“Application\\”: “module/Application/src/”,
“ModuleOne\\”: “module/ ModuleOne /src/”
}
},
- Next run composer update
That solves the problem.
Thanks for your time.

Leave a comment