From b0b216b784cbe22fc40ddb4570f4804328db15f9 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 31 Aug 2026 20:26:30 +0000 Subject: [PATCH] Run backend as module (python -m) in devserver instead of PATH-installed CLI. --- template/scripts/fastapi-vue/devutil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/template/scripts/fastapi-vue/devutil.py b/template/scripts/fastapi-vue/devutil.py index e268753..2c8023b 100644 --- a/template/scripts/fastapi-vue/devutil.py +++ b/template/scripts/fastapi-vue/devutil.py @@ -244,5 +244,7 @@ def setup_cli( host = endpoints[0]["host"] port = endpoints[0]["port"] - cmd = [cli, f"--listen={host}:{port}"] + # Run the package as a module with the current interpreter, instead of + # relying on a PATH-installed CLI entry point. + cmd = [sys.executable, "-m", cli, f"--listen={host}:{port}"] return f"http://{host}:{port}", cmd