From fc6853ba398db9dc0bbe7535292f90b1c5c33b85 Mon Sep 17 00:00:00 2001 From: Adrian Gavrila Date: Fri, 17 Apr 2026 13:37:40 -0400 Subject: [PATCH] FIX: resolve npm path in prepare_package.py on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows, subprocess.run([ pm, ...]) fails with FileNotFoundError because npm is actually npm.cmd. The resolved npm path from shutil.which( pm) is already stored in the pm variable above — use it consistently. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- build_scripts/prepare_package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_scripts/prepare_package.py b/build_scripts/prepare_package.py index 2236ec93e8..4be8b5e38c 100644 --- a/build_scripts/prepare_package.py +++ b/build_scripts/prepare_package.py @@ -48,7 +48,7 @@ def build_frontend(frontend_dir: Path) -> bool: print("\nInstalling frontend dependencies...") try: subprocess.run( - ["npm", "install", "--legacy-peer-deps"], + [npm, "install", "--legacy-peer-deps"], cwd=frontend_dir, check=True, stdout=subprocess.PIPE,