From 39f17b0759b8d72541b7903d0e4a8814123f3fa7 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..ca6b1b6b333 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; @@ -267,6 +268,9 @@ private void runNpmInstall() throws ExecutionFailedException { } npmInstallCommand.add("--ignore-scripts"); + if (options.getFeatureFlags().isEnabled(FeatureFlags.REACT19)) { + npmInstallCommand.add(" --legacy-peer-deps"); + } if (options.isCiBuild()) { if (options.isEnablePnpm() || options.isEnableBun()) {