Skip to content

Commit

Permalink
Do not assume node_modules exist when running prepare-frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Eriksson committed Nov 6, 2021
1 parent d835b62 commit f2a40ba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
import elemental.json.JsonObject;

import static com.vaadin.flow.server.Constants.STATISTICS_JSON_DEFAULT;
import static com.vaadin.flow.server.Constants.TARGET;
import static com.vaadin.flow.server.Constants.VAADIN_SERVLET_RESOURCES;
import static com.vaadin.flow.server.Constants.VAADIN_WEBAPP_RESOURCES;
import static com.vaadin.flow.server.InitParameters.SERVLET_PARAMETER_STATISTICS_JSON;
Expand Down Expand Up @@ -659,8 +660,8 @@ public static File resolveFrontendPath(File projectRoot, String path) {
File localFrontendFolder = new File(projectRoot,
FrontendUtils.FRONTEND);
File nodeModulesFolder = new File(projectRoot, NODE_MODULES);
File flowFrontendFolder = new File(nodeModulesFolder,
"@vaadin/" + DEFAULT_FLOW_RESOURCES_FOLDER);
File flowFrontendFolder = new File(projectRoot,
TARGET + "/" + DEFAULT_FLOW_RESOURCES_FOLDER);
List<File> candidateParents = path.startsWith("./")
? Arrays.asList(localFrontendFolder, flowFrontendFolder)
: Arrays.asList(nodeModulesFolder, localFrontendFolder,
Expand Down

0 comments on commit f2a40ba

Please sign in to comment.