get-port
npmv7.2.0TypeScriptGet an available port
Safe to adopt
Yes — get-port scores well across adoption, maintenance, weight, supply chain, and licensing. 17M downloads per week and 1 known dependents. Last published 172 days ago.
- AAdoption: grade A, Excellent.
17M downloads per week and 1 known dependents.
- BMaintenance: grade B, Good.
Last published 172 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 14 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding get-port to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=16
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the get-port README.
import getPort from 'get-port';
console.log(await getPort());
//=> 51402get-port vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| get-portthis page | 17M | 1 | MIT | 5 months ago |
| p-locate | 216.9M | 1 | MIT | 1 day ago |
| locate-path | 0 | 1 | MIT | 1 day ago |
| has-flag | 166.9M | 1 | MIT | 1 day ago |
| escalade | 136.6M | 3 | MIT | 1 day ago |
| open | 130.4M | 4 | MIT | 1 day ago |
Dependencies
Declared by get-port v7.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (4)
Used by
Popular packages that depend on get-port.
Relationship graph
Dependencies (left) and dependents (right) of get-port.
Frequently installed together
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
A helper utility for logging of WebdriverIO packages
Find apps installed on your system. This util will help to find executables of a known app like Chrome, Firefox,... on Windows, Linux, and macOS out of the box.
split a Text Stream into a Line Stream, using Stream 3
Microsofts' EdgeDriver for Node.js
An NPM wrapper for handling the Safaridriver binary.
Utility to wait for a TCP port to open.
Download and launch browsers
Mozilla's Geckodriver for Node.js
Utility package providing type information for a variety of WebdriverIO interfaces
Resolve things like Node.js — ponyfill for `import.meta.resolve`
Release history
1 release in the last two years, typically about 137 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 7.2.0latest | 5 months ago | 14 KB | MIT |
| 7.1.0 | 2 years ago | 12 KB | MIT |
| 7.0.0 | 3 years ago | 10 KB | MIT |
| 6.1.2 | 4 years ago | 11 KB | MIT |
| 6.1.1 | 4 years ago | 11 KB | MIT |
| 6.1.0 | 4 years ago | 11 KB | MIT |
| 6.0.0 | 5 years ago | 9.7 KB | MIT |
| 5.1.1 | 6 years ago | 8.5 KB | MIT |
| 5.1.0 | 6 years ago | 8.4 KB | MIT |
| 5.0.0 | 7 years ago | 6.9 KB | MIT |
| 4.2.0 | 7 years ago | 4.4 KB | MIT |
| 4.1.0 | 7 years ago | 3.9 KB | MIT |
| 4.0.0 | 8 years ago | 3.9 KB | MIT |
| 3.2.0 | 9 years ago | — | MIT |
| 3.1.0 | 9 years ago | — | MIT |
Overview
get-port is an npm package that get an available port. It is extremely widely used, with about 17M downloads per week and 1 known dependents in the graph. The latest version is 7.2.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get an available port and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (17M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use get-port?
Yes — get-port scores well across adoption, maintenance, weight, supply chain, and licensing. 17M downloads per week and 1 known dependents. Last published 172 days ago.
How do I install get-port?
Run `npm install get-port` to add get-port to your npm project.
What license is get-port released under?
get-port is distributed under the MIT license.
How popular is get-port?
get-port has approximately 17,038,677 downloads per week and 1 known dependent packages.
Is get-port still maintained?
The most recent release of get-port (v7.2.0) was published 5 months ago.
Does get-port run install scripts?
No. get-port does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.