Skip to content

Commit 047ce3c

Browse files
vaadin-botsgpublic
andauthored
fix: respect configured nodeFolder in DevModeInitializer (#23293) (#23297)
Flow ignored the configured nodeFolder and always attempted to resolve and download its own Node.js distribution. When nodeFolder is explicitly set, Flow should rely on the Node installation from that directory and avoid triggering the Node download logic. This change ensures that Node resolution correctly honors the nodeFolder configuration in DevModeInitializer. Fixes #23291 Co-authored-by: Haven Madray <sgpublic2002@gmail.com>
1 parent 8346e7f commit 047ce3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vaadin-dev-server/src/main/java/com/vaadin/base/devserver/startup/DevModeInitializer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
import static com.vaadin.flow.server.Constants.VAADIN_SERVLET_RESOURCES;
8484
import static com.vaadin.flow.server.Constants.VAADIN_WEBAPP_RESOURCES;
8585
import static com.vaadin.flow.server.InitParameters.NODE_DOWNLOAD_ROOT;
86+
import static com.vaadin.flow.server.InitParameters.NODE_FOLDER;
8687
import static com.vaadin.flow.server.InitParameters.NODE_VERSION;
8788
import static com.vaadin.flow.server.InitParameters.NPM_EXCLUDE_WEB_COMPONENTS;
8889
import static com.vaadin.flow.server.InitParameters.REACT_ENABLE;
@@ -310,6 +311,7 @@ public static DevModeHandler initDevModeHandler(Set<Class<?>> classes,
310311
.withNpmExcludeWebComponents(npmExcludeWebComponents)
311312
.withNodeVersion(config.getStringProperty(NODE_VERSION,
312313
DEFAULT_NODE_VERSION))
314+
.withNodeFolder(config.getStringProperty(NODE_FOLDER, null))
313315
.withNodeDownloadRoot(
314316
URI.create(config.getStringProperty(NODE_DOWNLOAD_ROOT,
315317
NodeInstaller.DEFAULT_NODEJS_DOWNLOAD_ROOT)));

0 commit comments

Comments
 (0)