Skip to content
Latchkey

npm "ETARGET No matching version found" in CI

npm could not find any published version satisfying the requested range. Either the range is wrong, the version was unpublished, or a registry replication delay temporarily hid it.

What this error means

Install fails with "ETARGET No matching version found for pkg@^1.2.3". The version may be brand new (registry not yet propagated) or simply never published.

node
npm error code ETARGET
npm error notarget No matching version found for @scope/pkg@^2.5.0.
npm error notarget In most cases you or one of your dependencies are
requesting a package version that doesn't exist.

Common causes

The requested range does not exist

A typo, an over-tight range, or a dependency pinning a version that was never published yields no match.

Registry propagation delay

A just-published version has not replicated to the mirror/proxy the runner uses, so it appears missing momentarily.

How to fix it

Verify and correct the version range

Check what versions exist and adjust the range to a published one.

Terminal
npm view @scope/pkg versions --json
# then set a range that exists, e.g.
npm install @scope/pkg@2.4.1

Retry against the canonical registry

If a proxy lags behind, retry the install so propagation can catch up.

Terminal
npm install --registry=https://registry.npmjs.org/

How to prevent it

  • Verify versions exist with npm view before pinning.
  • Avoid depending on versions published seconds earlier in the same pipeline.
  • Latchkey self-healing managed runners auto-retry transient ETARGET registry-propagation blips so a momentary mirror lag does not fail the install.

Related guides

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