diff --git a/cockpit.changes b/cockpit.changes
index 6e0e522..f24f24c 100644
--- a/cockpit.changes
+++ b/cockpit.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Thu Aug 19 14:54:46 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
+
+- add --legacy-peer-deps to fix build
+
 -------------------------------------------------------------------
 Tue Aug  3 14:46:16 UTC 2021 - Ludwig Nussel <lnussel@suse.de>
 
diff --git a/cockpit.spec b/cockpit.spec
index b97c83a..1eca7b2 100644
--- a/cockpit.spec
+++ b/cockpit.spec
@@ -174,7 +174,7 @@ Recommends: subscription-manager-cockpit
 %autopatch -p1
 cp %SOURCE1 tools/cockpit.pam
 #
-local-npm-registry %{_sourcedir} install --also=dev
+local-npm-registry %{_sourcedir} install --also=dev --legacy-peer-deps
 
 %build
 find node_modules -name \*.node -print -delete