Exception\UnknownExtensionException: The module does not exist or is not installed I get this error on my site


  Drupal\Core\Extension\Exception\UnknownExtensionException: The module
  does not exist or is not installed. in
  Drupal\Core\Extension\ExtensionList->getExtensionInfo() (line 346 of
  ...core/lib/Drupal/Core/Extension/ExtensionList.php).


This error is happening in shared hosting server. 

  public function getExtensionInfo($extension_name) {
$all_info = $this-&gt;getAllInstalledInfo();
if (isset($all_info[$extension_name])) {
  return $all_info[$extension_name];
}
throw new UnknownExtensionException("The {$this-&gt;type} $extension_name does not exist or is not installed."); // line 346


}

I have been searching online and found lot of discussions but I could not fix it. How can I fix the error?

Php: 7.0
Drupal: 8
I have agree with @4k4 you can fix this with database

If your module have been deleted from the system use this query

delete from `key_value` where collection = 'system.schema' and name = '$extension_name';


for example:

delete from `key_value` where collection = 'system.schema' and name = 'config_tools';
delete from `key_value` where collection = 'system.schema' and name = 'git_config';