Skip to content
Latchkey

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.

pnpm output
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.

Terminal
# 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-offline

Cache a complete store

  1. Run pnpm fetch keyed on the lockfile so the store has all required metadata.
  2. Cache the pnpm store directory across runs.
  3. Use --prefer-offline instead of strict --offline if occasional fetches are acceptable.

How to prevent it

  • Warm the store with pnpm fetch before offline installs.
  • Cache the complete pnpm store keyed on the lockfile.
  • Prefer --prefer-offline over strict --offline when possible.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →