Registry / devops / redis-download

redis-download

JSON →
library1.0.36jsnpmunverified

A Node.js library and CLI tool to download and build Redis binaries. Version 1.0.36 is the latest stable, released via semantic-release with no clear cadence. It wraps the official Redis source download and compilation, providing a programmatic API (Promise-based) and a CLI. Differentiators include environment caching and cross-platform support (Linux, macOS, Windows via npm). Similar to mongodb-download but for Redis. Suitable for CI/CD or local development setups needing a specific Redis version.

npm install redis-download
INSTALL
IMPORT
SIG · REDIS-DOWNLOAD
R
redis-download
devopsjavascriptv1.0.36
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

redisDownload
import redisDownload from 'redis-download'
const { redisDownload } = require('redis-download')
Default export is a function; named import results in undefined.
redisDownload (with options)
redisDownload({ version: '5.0.3', downloadDir: './redis' }).then(console.log)
Both options are optional; version defaults to latest.
CLI usage
redis-download --version 5.0.3 --download-dir ./redis
redis-download -v 5.0.3 -d ./redis
CLI flags are long-form (no short aliases).

Downloads Redis version 7.2.0 to /tmp/redis using the programmatic API.

const redisDownload = require('redis-download'); redisDownload({ version: '7.2.0', downloadDir: '/tmp/redis' }) .then((location) => { console.log(`Downloaded to: ${location}`); }) .catch((err) => { console.error('Download failed:', err.message); });
Debug
Known issues
breakingNode.js >= 12.8.0 required (engines field). Older versions may fail.
fix
Upgrade Node.js to >=12.8.0 or use an older package version.
affects: <1.0.0
gotchaInstallation triggers postinstall script that downloads and compiles Redis source, causing heavy CPU load and multiple minutes of build time. Network required.
fix
Expect long install time. Use --ignore-scripts to skip, then manually run redis-download.
affects: >=1.0.0
gotchaCLI --version flag expects exact version string like '5.0.3'. 'latest' is not supported; mistyping '--version latest' silently defaults to latest (if omitted) but may cause confusion.
fix
Use numeric version without 'v' prefix (e.g., '5.0.3').
affects: >=1.0.0
gotchaThe built binary is not automatically added to PATH. Must locate it via the returned downloadDir or use --download-dir output.
fix
After download, add the downloadDir to PATH or reference the redis-server binary directly.
affects: >=1.0.0
deprecatedThe package uses deprecated Node.js APIs (e.g., callback-based fs); may break in future Node versions.
fix
Consider using a more modern Redis downloader or fork.
affects: >=1.0.36
Errors
Common errors & fixes
Error: spawn make ENOENT
System missing C compiler (gcc, make) required to build Redis from source.
fix
Install build-essential (Linux) or Xcode Command Line Tools (macOS).
redisDownload is not a function
Named import instead of default import in CommonJS or ESM.
fix
Use require('redis-download') (default) or import redisDownload from 'redis-download'.
Error: .npmignore not found (or similar permissions error)
Postinstall script tries to download to restricted directory or fails due to missing write permissions.
fix
Run with sudo or change npm root ownership, or use --unsafe-perm.
Upgrade
Version history
1.0.36latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
redis-download — npm install redis-download · libregistry