Registry / devops / cachebust

cachebust

JSON →
library2.4.1jsnpmunverified

cachebust is a command-line tool that appends a query string to asset URLs (CSS/JS) in HTML files to force cache invalidation. The current stable version is 2.4.1, but the package has seen no updates since 2014, with only an initial v1.0.0 release. It relies on Grunt-based development and lacks modern ESM support, making it largely incompatible with contemporary build tooling. Compared to alternatives like gulp-rev or webpack's content hashing, cachebust is a minimal, single-purpose utility with no active maintenance or community support.

npm install cachebust
INSTALL
IMPORT
SIG · CACHEBUST
C
cachebust
devopsjavascriptv2.4.1
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.

default
import cachebust from 'cachebust';
const cachebust = require('cachebust');
Package does not export a default; it is primarily CLI. No module exports in v2.
cachebust
import cachebust from 'cachebust';
The package provides no JavaScript API; only CLI usage works.
require
const cheerio = require('cheerio');
import cheerio from 'cheerio';
Package internally uses CommonJS, but users shouldn't import this package programmatically.

Shows the basic CLI usage to add cachebust query strings to assets in an HTML file.

npx cachebust index.html
Debug
Known issues
gotchaPackage has not been updated since 2014; may have security vulnerabilities in dependencies.
fix
Switch to an actively maintained tool like gulp-rev or webpack's output.filename with content hashing.
affects: >=1.0.0
breakingNo programmatic API; only works as a CLI tool.
fix
Use child_process.spawn if needed, or choose a library with JS API.
affects: >=1.0.0
gotchaDoes not support modern module systems (ESM, CJS); all code is wrapped in a CLI script.
fix
Avoid importing directly; use CLI invocation only.
affects: >=1.0.0
deprecatedGrunt is required for development; not compatible with modern build systems.
fix
Consider alternative cachebusting solutions that integrate with webpack, Vite, etc.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'cheerio'
Missing dependency cheerio when installing without --save or manual install.
fix
Run 'npm install cachebust' which installs its dependencies automatically.
cachebust: command not found
Package not installed globally or not in PATH.
fix
Run 'npm install -g cachebust' to install globally.
TypeError: cachebust is not a function
Attempting to import and use cachebust as a function, but it only provides CLI.
fix
Use the package via command line: 'npx cachebust index.html'.
Upgrade
Version history
2.4.1latest on npm
Audit
Dependencies
cheeriorequiredUsed for parsing and manipulating HTML to append cachebust query strings
commanderrequiredProvides CLI argument parsing for the cachebust command
Agent activity
4 hits · last 30 days
node
4
Resources
cachebust — npm install cachebust · libregistry