I am struggling to install a drupal site from an existing configuration. Here the two approaches I tried:
OPTION 1: Import the config by changing the UID:
drush cex
on existing site
drush site:install
to install new site
drush cset system.site uuid 478e7e74-fea3......
to set UUID on new site equal to exisiting site
drush cim
on new site
RESULT:
The import failed due to the following reasons:
Unexpected error during import with operation delete for taxonomy.vocabulary.tags: Attempt to create a field body that does not exist on entity type node.
Unexpected error during import with operation delete for shortcut.set.default: Attempt to create a field body that does not exist on entity type node.
Unexpected error during import with operation delete for contact.form.personal: Attempt to create a field body that does not exist on entity type node.
.... (There are many more of these errors, but I stripped them here for better readability)
OPTION 2: Provide existing config during installation already
drush site:install --existing-config
with config from existing site being avilable in config directory of new site.
RESULT:
The selected profile has a hook_install() implementation and therefore can
not be installed from configuration.