'"entity_test" entity type does not exist' on attempted module uninstall I'm in the process of replacing D8's core Search module with Search API. When I try uninstalling Search, I get this error:


  Drupal\Component\Plugin\Exception\PluginNotFoundException: The "entity_test" entity type does not exist. in /Applications/MAMP/htdocs/mysite/core/lib/Drupal/Core/Entity/EntityTypeManager.php:133


There is an entity_test table in the database, along with a number of related tables. I also have $settings['extension_discovery_scan_tests'] = FALSE; in the settings.local.php file.

How do I address this error?
Sounds like you installed the entity_test module accidentally and then disabled test modules afterwards.

Set that flag to TRUE, clear cache, uninstall search and the entity_test module (look for other enabled _test modules too) then set that flag to FALSE again.