Configuration Management is broken between two site environments, I have no idea how to fix it I started working on a d8 site two weeks ago; there are two site environments: @dev and @staging, on different servers. I have been developing the site locally (adding views, pages etc.) and using the configuration exporter to export a compressed config file from @dev which I then import @staging. I occasionally use the single export/import tab to pass configuration upstream.

Mostly it's been working fine until recently. I somehow broke the site when I added a specific view. Now whenever I try to import into @staging i get the same error, regardless of what I'm importing:


  The configuration cannot be imported because it failed validation for the following reasons:
  Configuration views.view.view_name depends on the module that will not be installed after import.


A while ago I created a module (using drupal console) with the purpose of inserting a block, but it failed (probably because I gave the module the same name as the theme I'm developing). I removed this module, but not before enabling it on one or more of the sites - it's the only thing I did that broke the site (prompting a restore from an earlier database version).

I just want to fix the configuration syncing between the two sites, because I can't go on re-configuring both versions of the site for each and every change. That's so D7.

I'd be happy to provide any other information needed to help diagnose/solve the issue. I use git to synchronise themes between the two files, filezilla to copy site files from @staging -> @dev, drush to install any modules (eg. drush en ds) to @dev and git to transfer those changes to @staging. Occasionally I'll synchronise databases from @staging -> @dev (because content entry - handled by another internal team - has begun).
Aaaaaargh! After banging my head against the wall I found the issue. I checked the yml output (either single export tab; the /sync folder; or in the compressed export file) and found the 'broken' line:

dependencies:
  config:
    - core.entity_view_mode.node.teaser
    - node.type.leistungen
  module:
    - null
    - node
    - user


I removed the '- null' entry and retried the import - it worked fine.

MegaDoh!