From f0a5d40b4fbedc787665a302ad05fc320520d3a2 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 10 Jan 2025 09:39:31 +0200 Subject: [PATCH] chore: Run with --legacy-peer-deps for React 19 Needed until there is a new Lit release --- .../com/vaadin/flow/server/frontend/TaskRunNpmInstall.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java index a95fe4d8def..9db9835bcee 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java @@ -32,6 +32,7 @@ import org.apache.commons.io.FileUtils; import org.slf4j.Logger; +import com.vaadin.experimental.FeatureFlags; import com.vaadin.flow.internal.Pair; import com.vaadin.flow.server.Constants; import com.vaadin.flow.server.ExecutionFailedException; @@ -106,6 +107,9 @@ public void execute() throws ExecutionFailedException { command = "ci"; } } + if (options.getFeatureFlags().isEnabled(FeatureFlags.REACT19)) { + command += " --legacy-peer-deps"; + } if (packageUpdater.modified || shouldRunNpmInstall()) { packageUpdater.log().info("Running `" + toolName + " " + command