Drupal 8 Error when synching THEMENAME.settings


I cam across an error when synching configurations from my Drupal 8 local environment to my development environment. The error is as folllows

Error: configuration THEMENAME.settings depends on the THEMENAME extension that will not be installed after import.

Not entirely sure if this is a bug in D8 core but the root cause was that it when exporting the configurations from my local environment the "Configuration manager" module in D8 core was picking up an odd looking configuration. 


The solution was to stop or make sure the"Configuration manager" module did not pick up the error causing config. change. I found the solution on the following page

First you need to check if the config exists. Execute the following select query to do so

SELECT * FROM `config` WHERE `name` LIKE '%THEMENAME.settings%';

select query themename.settings


Now delete the specific row using the following query

DELETE FROM `config` WHERE `name` LIKE '%THEMENAME.settings%';

Once deleted export the configurations once more then import it on your remote (dev) site.