diff --git a/lib/core/src/server/cli/dev.js b/lib/core/src/server/cli/dev.js index 04a589e07cd1..9dab960414f1 100644 --- a/lib/core/src/server/cli/dev.js +++ b/lib/core/src/server/cli/dev.js @@ -57,6 +57,10 @@ async function getCLI(packageJson) { configDir: 'SBCONFIG_CONFIG_DIR', }); + if (typeof program.port === 'string' && program.port.length > 0) { + program.port = parseInt(program.port, 10); + } + const port = await getFreePort(program.port); if (!program.ci && !program.smokeTest && program.port != null && port !== program.port) {