diff --git a/packages/cli/lib/DevServerManager.js b/packages/cli/lib/DevServerManager.js index 3b468f410..ee774f6de 100644 --- a/packages/cli/lib/DevServerManager.js +++ b/packages/cli/lib/DevServerManager.js @@ -122,8 +122,10 @@ class DevServerManager { } }); - if (!portManagerHasActiveServers()) { - stopPortManagerServer(); + const hasActiveServers = await portManagerHasActiveServers(); + + if (!hasActiveServers) { + await stopPortManagerServer(); } } }