pnpm "ERR_PNPM_NO_OFFLINE_META" - Fix Offline Install Cache Miss in CI
In --offline mode pnpm refuses any network access and resolves only from the local store. ERR_PNPM_NO_OFFLINE_META means a package’s metadata is not cached, so pnpm cannot resolve it without going online.
What this error means
pnpm install --offline (or with network-concurrency=0/offline config) fails with ERR_PNPM_NO_OFFLINE_META, naming a package whose metadata is not in the store. A normal (online) install would fetch it.
ERR_PNPM_NO_OFFLINE_META Failed to resolve lodash@^4.17.21 in offline mode.
No metadata in the store for the package.Common causes
Offline mode against an unprimed store
A package (or version) was never fetched into the store, so offline resolution has no metadata for it.
A restored store missing some packages
A partial or stale store cache restored in CI lacks metadata for dependencies the lockfile requires.
How to fix it
Prime the store, then go offline
Do an online fetch into the store first (or use prefer-offline), then offline installs resolve from it.
# prime the store online once:
pnpm fetch
# then offline installs resolve from the store:
pnpm install --offline
# or be lenient: try store first, fall back to network
pnpm install --prefer-offlineCache a complete store
- Run
pnpm fetchkeyed on the lockfile so the store has all required metadata. - Cache the pnpm store directory across runs.
- Use
--prefer-offlineinstead of strict--offlineif occasional fetches are acceptable.
How to prevent it
- Warm the store with
pnpm fetchbefore offline installs. - Cache the complete pnpm store keyed on the lockfile.
- Prefer
--prefer-offlineover strict--offlinewhen possible.