Registry / devops / elm-dep-cache

elm-dep-cache

JSON →
library1.0.2jsnpmunverified

A Node.js tool (v1.0.2) that caches Elm dependencies based on elm.json checksums to prevent CI/CD connection timeouts when fetching from package.elm-lang.org. It provides fast restore from local cache, optional cleaning of old caches, and integrates easily into CI pipelines like GitHub Actions, GitLab CI, and CircleCI. No additional dependencies required. Works with Node >=14.

npm install elm-dep-cache
INSTALL
IMPORT
SIG · ELM-DEP-CACHE
E
elm-dep-cache
devopsjavascriptv1.0.2
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.

elm-dep-cache (CLI)
npx elm-dep-cache
Global install without npx (still works but npx is recommended)
This is a CLI tool, not a library. Use npx for zero-install or install globally.

Show how to install and use elm-dep-cache as a CLI tool in an Elm project, including basic usage and clean option.

// In your Elm project directory with elm.json // Run once to cache dependencies (slow first time, fast subsequent) npx elm-dep-cache // Clean old caches (optional) npx elm-dep-cache --clean // Then build Elm as usual elm make src/Main.elm --output=main.js
Debug
Known issues
gotchaRequires elm.json in the project directory. If missing, tool will fail with no clear error.
fix
Ensure you run the command from a directory containing an elm.json file.
affects: >=1.0.0
gotchaCache is stored in ./.elm-dep-cache/ relative to current working directory, not the project root. Running from a different directory may create unintended caches.
fix
Always run npx elm-dep-cache from the root of your Elm project where elm.json lives.
affects: >=1.0.0
gotchaTool does not validate ELM_HOME path; if set incorrectly, cache may not be restored or may overwrite unintended directories.
fix
Set ELM_HOME to a valid Elm home directory (default ~/.elm on macOS/Linux).
affects: >=1.0.0
Errors
Common errors & fixes
ELM_HOME is not defined, using default: ~/.elm
ELM_HOME environment variable not set; tool falls back to default location.
fix
Set ELM_HOME explicitly if you have a custom Elm home: export ELM_HOME=/custom/path
Error: elm.json not found
Tool ran in a directory without elm.json.
fix
Run npx elm-dep-cache in the root of your Elm project containing elm.json.
Upgrade
Version history
1.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
elm-dep-cache — npm install elm-dep-cache · libregistry