</>PackageGraphPackageGraph

get-port

npmv7.2.0TypeScript

Get 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.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

14 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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());
//=> 51402

get-port vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
get-portthis page17M1MIT5 months ago
p-locate216.9M1MIT1 day ago
locate-path01MIT1 day ago
has-flag166.9M1MIT1 day ago
escalade136.6M3MIT1 day ago
open130.4M4MIT1 day ago

Dependencies

Declared by get-port v7.2.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (4)

@types/node ^20.2.5ava ^5.3.0tsd ^0.28.1xo ^0.54.2

Used by

Popular packages that depend on get-port.

Relationship graph

Dependencies (left) and dependents (right) of get-port.

@wdio/utilsget-port
get-port dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 137 days apart.

Recent versions of get-port
VersionPublishedSizeLicense
7.2.0latest5 months ago14 KBMIT
7.1.02 years ago12 KBMIT
7.0.03 years ago10 KBMIT
6.1.24 years ago11 KBMIT
6.1.14 years ago11 KBMIT
6.1.04 years ago11 KBMIT
6.0.05 years ago9.7 KBMIT
5.1.16 years ago8.5 KBMIT
5.1.06 years ago8.4 KBMIT
5.0.07 years ago6.9 KBMIT
4.2.07 years ago4.4 KBMIT
4.1.07 years ago3.9 KBMIT
4.0.08 years ago3.9 KBMIT
3.2.09 years agoMIT
3.1.09 years agoMIT

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

Keywords

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.