An error occurred while installing ecommerce integrations

hello guys.
While installing ecommerce_integrations app getting this error. Have you ever encountered such a problem? How to solve this problem?

frappe v14.18.1
erpnext v14.10.0

frappe@VM-6-13-ubuntu:~/frappe-bench$ bench --site site1 install-app ecommerce_integrations
Installing ecommerce_integrations…
An error occurred while installing ecommerce_integrations: (‘Module Def’, ‘Ecommerce Integrations’, IntegrityError(1062, “Duplicate entry ‘Ecommerce Integrations’ for key ‘PRIMARY’”))
Traceback (most recent call last):
File “apps/frappe/frappe/model/”, line 494, in db_insert
File “apps/frappe/frappe/database/”, line 218, in sql
self._cursor.execute(query, values)
File “env/lib/python3.10/site-packages/pymysql/”, line 148, in execute
result = self._query(query)
File “env/lib/python3.10/site-packages/pymysql/”, line 310, in _query
File “env/lib/python3.10/site-packages/pymysql/”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.10/site-packages/pymysql/”, line 775, in _read_query_result
File “env/lib/python3.10/site-packages/pymysql/”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.10/site-packages/pymysql/”, line 725, in _read_packet
File “env/lib/python3.10/site-packages/pymysql/”, line 221, in raise_for_error
File “env/lib/python3.10/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.IntegrityError: (1062, “Duplicate entry ‘Ecommerce Integrations’ for key ‘PRIMARY’”)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “apps/frappe/frappe/commands/”, line 413, in install_app
_install_app(app, verbose=context.verbose, force=force)
File “apps/frappe/frappe/”, line 292, in install_app
add_module_defs(name, ignore_if_duplicate=force)
File “apps/frappe/frappe/”, line 612, in add_module_defs
d.insert(ignore_permissions=True, ignore_if_duplicate=ignore_if_duplicate)
File “apps/frappe/frappe/model/”, line 268, in insert
File “apps/frappe/frappe/model/”, line 521, in db_insert
raise frappe.DuplicateEntryError(self.doctype,, e)
frappe.exceptions.DuplicateEntryError: (‘Module Def’, ‘Ecommerce Integrations’, IntegrityError(1062, “Duplicate entry ‘Ecommerce Integrations’ for key ‘PRIMARY’”))

This error will be reported when the installation fails to be reinstalled.

bench --site site1 uninstall-app ecommerce_integrations --force
bench --site site1 install-app ecommerce_integrations
  • Forced uninstall is the only way to truly uninstall the failed app, there will be no more errors