From 7d74fec587b8875ee6056a32c34e45485c08823e Mon Sep 17 00:00:00 2001 From: Yi-111-a <153097222+Yi-111-a@users.noreply.github.com> Date: Fri, 25 Sep 2026 16:05:21 +0800 Subject: [PATCH] fix: keep the server frontend install out of a parent pnpm workspace pnpm walks upward from the frontend directory and joins a workspace whose root is outside this repo, so the CMake install can target that workspace's node_modules. Pass --ignore-workspace so the frontend package stays local. --- examples/server/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 5c462258bc..302a8d6099 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -21,21 +21,21 @@ if(SD_SERVER_BUILD_FRONTEND AND EXISTS "${FRONTEND_DIR}") set(HAVE_FRONTEND_BUILD ON) add_custom_target(${TARGET}_frontend_install - COMMAND "${PNPM_EXECUTABLE}" -C "${FRONTEND_DIR}" install + COMMAND "${PNPM_EXECUTABLE}" --ignore-workspace -C "${FRONTEND_DIR}" install WORKING_DIRECTORY "${FRONTEND_DIR}" COMMENT "Installing frontend dependencies" VERBATIM ) add_custom_target(${TARGET}_frontend_build - COMMAND "${PNPM_EXECUTABLE}" -C "${FRONTEND_DIR}" run build + COMMAND "${PNPM_EXECUTABLE}" --ignore-workspace -C "${FRONTEND_DIR}" run build WORKING_DIRECTORY "${FRONTEND_DIR}" COMMENT "Building frontend" VERBATIM ) add_custom_target(${TARGET}_frontend_header - COMMAND "${PNPM_EXECUTABLE}" -C "${FRONTEND_DIR}" run build:header + COMMAND "${PNPM_EXECUTABLE}" --ignore-workspace -C "${FRONTEND_DIR}" run build:header WORKING_DIRECTORY "${FRONTEND_DIR}" COMMENT "Generating gen_index_html.h" VERBATIM