How to resolve error Unable to install the responsive_tables_filter module since it does not exist I am getting an error when importing the configuration from our development branch. When running. drush cim staging.
The error is. 


  The import failed due to the following reasons: Unable to install the responsive_tables_filter module since it does not exist. We installed this module a long time ago but then unistalled it, disabled it, then deleted it.


There were settings for responsive_tables_filter in these 2 config files.
/config/core.extension.yml
/config/lightning_core.versions.yml

I removed both settings. Then ran drush export then pulled from development again and ran drush import and the error was gone.
Is it safe to manually edit these files?
If the module was never installed in the target environment, it is safe to do so.

If the module was installed before however, and it features uninstall hooks for cleaning up possibly installed database tables, key/value pairs (State API), and the like, then your approach may leave data behind.

The more appropriate way would have been to uninstall the module after you restored its module files, then export the configuration again in development, push it to production and do the import there.

Afterwards you can safely delete the module files from your environments.

The error you've seen indicates, that your code base was not in sync with your configuration. You possibly tested modules and removed its files before uninstalling them.