published fresh until

npm ERR! code ETARGET — no matching version

Summary ETARGET means npm found no eligible version for the requested specification. Compare published versions, the selected registry and any date cutoff before editing the dependency. Inspect the package history with npm view <package> versions --json

Not for pnpm ERR_PNPM_NO_MATCHING_VERSION; see pnpm-invalid-setting-no-matching-version-optional-peer-errors

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

npm ERR! code ETARGET npm cannot select an eligible version for the package specification named in the accompanying notarget line. Do first: run npm view <package> versions --json, replacing the placeholder with that package name; compare its available versions with the exact request in the error. Evidence: npm documents version metadata and date filters, while dated reports show both unavailable versions and filter-related failures. Not for: pnpm ERR_PNPM_NO_MATCHING_VERSION; see pnpm-invalid-setting-no-matching-version-optional-peer-errors

As of November 2026, the install branches below target npm 11.21.2, released November 3, 2026. The title retains a legacy log prefix; newer logs can begin npm error code ETARGET.

Diagnostic: No matching version found

The package and requested range after this text are essential. A real version can still be ineligible because of the registry or a date filter.

Choose the branch

1. npm 11.21.2: no published version satisfies the request. Use npm view to inspect versions and dist-tags. For a direct dependency, replace the mistaken version or range in package.json with an available, compatible release, then run npm install. For a transitive request, select a compatible parent release whose dependency metadata fixes it; inspect that release with npm view <parent>@<version> dependencies --json. Replace every placeholder. Check: the selected version satisfies the corrected range and installation proceeds past that notarget error. Publishing histories need not contain every possible version number.

2. npm 11.21.2: the version exists elsewhere but not in this registry. Run npm config get registry; for a scoped package also run npm config get @scope:registry, substituting its scope. For an unscoped package, compare npm view <package> versions --json --registry=<intended-registry-url> against the default lookup. For a scoped package, correct its scope-specific registry mapping and repeat the normal lookup. Registry configuration and per-scope npmrc entries determine the destination. Correct the relevant project configuration or let its mirror synchronize. Check: the normal lookup now returns the intended release. Keep private packages on their intended registry.

3. npm 11.21.2: the error includes a date cutoff. Read npm config get before and npm config get min-release-age, then inspect npm view <package> time --json. The date-filter reference excludes otherwise published releases. Choose an older compatible eligible version or wait until the intended version clears the configured window, then rerun the install. Check: the release's publication time falls before the effective cutoff and npm selects it. An explicit before can also constrain selection; waiting does not move an absolute date.

Evidence and limits

Daniela Romero's June 2, 2017 report names ionic-native@^3.5.0. It establishes longstanding demand, not a recommendation to install that old package.

There is a separate execution-path caveat: ffrosch's July 14, 2026 issue reports npx ignoring min-release-age-exclude on npm 12.0.1; slorber reports the symptom on 11.19. Do not infer a fix in 11.21.2 from those reports. The changelog dates that exclusion setting to 11.17.0. An install-time exclusion is not a promise about every execution path.

An ERESOLVE peer conflict has a different cause; see npm-install-eresolve-peer-dependency-conflict-before-force. Changing peer flags does not publish a missing version.

Started from a post by @npm, packaged by the editor. Original post

Subjects

More in documentation

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# npm ERR! code ETARGET — no matching version
Summary: ETARGET means npm found no eligible version for the requested specification. Compare published versions, the selected registry and any date cutoff before editing the dependency. Inspect the package history with `npm view <package> versions --json`
Copy for agent
get the whatworks thread npm-etarget-no-matching-version-registry-range-age and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread npm-etarget-no-matching-version-registry-range-age
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks