{"record":{"id":"82634848e73af277","repo":"quasarframework/quasar","slug":"error-network-port-not-avail-826348","errorCode":"ERROR_NETWORK_PORT_NOT_AVAIL","errorMessage":"Could not find an open port. Please configure a lower one to start searching with.","messagePattern":"Could not find an open port\\. Please configure a lower one to start searching with\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app-vite/lib/quasar-config-file.js","lineNumber":267,"sourceCode":"      host = await getExternalIP()\n      cachedExternalHost = host\n    }\n  }\n\n  try {\n    const openPort = await findClosestOpenPort(port, host)\n    if (port !== openPort) {\n      warn()\n      warn(`️️Setting port to closest one available: ${openPort}`)\n      warn()\n\n      port = openPort\n    }\n  } catch (err) {\n    warn()\n\n    if (err.message === 'ERROR_NETWORK_PORT_NOT_AVAIL') {\n      warn(\n        'Could not find an open port. Please configure a lower one to start searching with.'\n      )\n    } else if (err.message === 'ERROR_NETWORK_ADDRESS_NOT_AVAIL') {\n      warn(\n        'Invalid host specified. No network address matches. Please specify another one.'\n      )\n    } else {\n      warn('Unknown network error occurred')\n      console.error(err)\n    }\n\n    warn()\n\n    if (!addressRunning) process.exit(1)\n    return null\n  }\n\n  addressRunning = true","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/quasarframework/quasar/blob/4841521b5f635a971eb9e2710e5542efd194691b/app-vite/lib/quasar-config-file.js#L249-L285","documentation":"When no server address is configured, Quasar auto-detects a network address and then searches upward from the configured port for a free one. If the port-finding routine fails with ERROR_NETWORK_PORT_NOT_AVAIL, this warning is emitted because no open port could be found within the search range.","triggerScenarios":"devServer.port in quasar.config.js is set to a very high value (e.g. 65535 or above the max) so no port can be found by incrementing; the port scanner can't bind any candidate port on the chosen host.","commonSituations":"Port set to 65535 or a value near the upper bound; firewall/permission restrictions blocking binding; misconfigured host combined with an unrealistic starting port; container environments with restricted port ranges.","solutions":["Lower devServer.port in quasar.config.js to a normal value (e.g. 9000 or 8080) so the upward search succeeds","Check the configured devServer.host is valid (see the related address warning otherwise)","Ensure no firewall/SELinux policy blocks binding ports in that range","Pick a different starting port if your environment reserves certain ranges"],"exampleFix":"// before (quasar.config.js)\ndevServer: { port: 65535 }\n// after\ndevServer: { port: 9000 }","handlingStrategy":"validation","validationCode":"// validate configured port before running dev\nconst port = require('./quasar.config.js').devServer.port\nif (port > 65500) {\n  console.error('devServer.port too high; use a value like 9000 so a free port can be found')\n}","typeGuard":null,"tryCatchPattern":"// if you bind ports yourself before starting quasar dev\ntry {\n  server.listen(preferredPort)\n} catch (err) {\n  if (err.code === 'EACCES' || err.code === 'EADDRINUSE') {\n    console.warn(`Port ${preferredPort} unavailable, falling back to 0 (auto-assign)`)\n    server.listen(0)\n  }\n}","preventionTips":["Keep devServer.port at a normal mid-range value (e.g. 8080-9000)","Don't set the port to 65535 or near the TCP upper bound","Verify devServer.host matches a real network interface","Check firewall/SELinux policies if ports in your range are blocked"],"tags":["dev-server","port","network"],"backgroundTag":"no-open-port-available","analyzedSha":"4841521b5f635a971eb9e2710e5542efd194691b","analyzedAt":"2026-08-30T01:13:14.944Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}