How to solve "Duplicate Of Template Name"?
Duplicate of Template name comes from the module-email So setup:upgrade tries to add e-mail templates that already exist. Remove any non altered templates from the database.
Run:
bin/magento setup:upgrade
Probably the issue is on database, so open the table setup_module
and complete the module that doesn't have data_version
completed.