This error appears on setup upgrade
| SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Cp_WishlistApi' for key 'PRIMARY', query was: INSERT INTO `setup_module` (`module`, `schema_version`) VALUES (?, ?)
please clear the cache and run the command php bin/magento setup:upgrade
It says there's already a row with 'Cp_WishlistApi' module value.
So, you can try removing it;
DELETE FROM setup_module WHERE module='Cp_WishlistApi'
and
bin/magento setup:upgrade