From 00b87a7c266bd66c8a830a5c8d7164ebcd0b3454 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Thu, 11 Sep 2025 18:30:19 +0000 Subject: [PATCH] build: automatically select a random available port when running adev locally (#63740) Previously we relied on the default port of 4200, but if it was already in use then we would run into issues where the cli provided a prompt which we were unable to respond to. Instead we now request port 0 which will automatically find an available port. PR Close #63740 --- MODULE.bazel | 2 +- adev/BUILD.bazel | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 4351d5abb8f..c5b2bb6070f 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -18,7 +18,7 @@ bazel_dep(name = "yq.bzl", version = "0.2.0") bazel_dep(name = "rules_angular") git_override( module_name = "rules_angular", - commit = "17eac47ea99057f7473a7d93292e76327c894ed9", + commit = "4010ef96de0c46db7764adc2f262258c9de3d718", remote = "https://github.com/devversion/rules_angular.git", ) diff --git a/adev/BUILD.bazel b/adev/BUILD.bazel index 23f69cfbf61..7cb909b990c 100644 --- a/adev/BUILD.bazel +++ b/adev/BUILD.bazel @@ -146,6 +146,10 @@ ng_application( ng_config = ":ng_config", node_modules = "//adev:node_modules", project_name = "angular-dev", + serve_args = config_based_architect_flags + [ + "--port", + "0", + ], ) ng_test(