Registry / http-networking / speed-test

speed-test

JSON →
library0.1jsnpmunverified

speed-test is a Node.js CLI tool that measures internet connection speed and ping using the speedtest.net service. It provides a straightforward command-line interface to quickly assess bandwidth metrics like download, upload, and ping latency. The current stable version is 3.0.0, which requires Node.js 12.20 or higher. While primarily designed for global CLI usage, it also offers a programmatic API for integration into other JavaScript projects. Releases typically follow dependency updates or Node.js compatibility changes, maintaining a focus on simplicity and reliability.

npm install speed-test
INSTALL
IMPORT
SIG · SPEED-TEST
S
speed-test
http-networkingjavascriptv0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

speedTest
import speedTest from 'speed-test';
import { speedTest } from 'speed-test';
The main functionality is a default export, typically used for programmatic access to the speed test logic.
speedTest
const speedTest = require('speed-test');
const { speedTest } = require('speed-test');
CommonJS `require` for Node.js environments. The package is ESM-first but provides a CJS entry point.
SpeedTestOptions
import type { Options as SpeedTestOptions } from 'speed-test';
import { SpeedTestOptions } from 'speed-test';
Type import for configuration options, assuming 'Options' is the correct type name based on common patterns for Sindresorhus packages. Adjust `Options` if the actual type name differs.

Demonstrates global installation and common command-line usages of the speed-test CLI tool.

npm install --global speed-test # Run a basic speed test speed-test # Output results as JSON speed-test --json # Output results in megabytes per second (MBps) speed-test --bytes # Get more detailed information speed-test --verbose
Debug
Known issues
breakingVersion 3.0.0 and above now require Node.js 12.20.0 or newer. Older Node.js versions are no longer supported.
fix
Upgrade your Node.js installation to version 12.20.0 or higher. Use `nvm` or your system's package manager for managing Node.js versions.
affects: >=3.0.0
gotchaThe package is primarily intended for global CLI usage. While it offers a programmatic API, direct `import` or `require` into client-side browser bundles is not typically supported or recommended due to its reliance on Node.js-specific features for network communication.
fix
For browser-based speed tests, consider using a different library designed for the browser environment or invoke the CLI tool from a backend service.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Requires Node.js version 12.20 or higher.
Attempting to run `speed-test` on an unsupported Node.js version.
fix
Update your Node.js environment to version 12.20.0 or greater. Refer to `nodejs.org` for installation instructions.
speed-test: command not found
The `speed-test` package was not installed globally or is not in your system's PATH.
fix
Install the package globally using `npm install --global speed-test` or ensure your npm global bin directory is in your system's PATH.
Error: Could not find speedtest server or failed to connect.
Issues with internet connectivity, firewall restrictions, or temporary unavailability of speedtest.net servers.
fix
Verify your internet connection, check firewall settings, or try running the test again later. You might also try a different speed test tool if the issue persists.
Upgrade
Version history
0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
15 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
speed-test — npm install speed-test · libregistry