# npm error No matching version found How to fix it.

URL: https://antideploy.com/blog/npm-error-no-matching-version-found

No published version of a package matches the range in your package.json. This is usually a typo, or a version that has not been released.

**What you see**

```
npm error code ETARGET
npm error notarget No matching version found for react-hot-toast@^9.9.9.
npm error notarget In most cases you or one of your dependencies are
npm error notarget requesting a package version that doesn't exist.
```

## At a glance

- **What it means**: The version does not exist
- **Fix one**: Check the version on npm
- **Fix two**: Check the spelling
- **Then**: npm install, commit the lock file

Published 7 October 2026. Facts checked 7 October 2026. 1 min read.

## What it means

Your `package.json` asks for a package at a version range, and no published version fits it. The message names the package and the range. This is usually a typo in the version, or a package that has not shipped that release yet.

## How to fix it

### 1. Check which versions exist

Run `npm view react-hot-toast versions` to list the published versions, with your package name in place of the example.

### 2. Change the range

Use a version that exists, or a range that includes one, such as `^2.4.0`.

### 3. Run npm install and commit the lock file

A failed deploy never counts against your plan.

## Why it happens

Coding agents sometimes write a version number from memory, or one that has not been published. The version looks plausible and does not exist.

## Version questions, answered.

Anything else? Write to us and a person answers.

[support@antideploy.com](mailto:support@antideploy.com)

### Is it the package name or the version?

If the package does not exist at all, you get a different error. See [package not in this registry](https://antideploy.com/blog/npm-error-404-package-not-in-this-registry).

### Does this failed deploy cost anything?

No. Failed deploys never count against your plan.

### What range should I use?

A caret range such as `^2.4.0` accepts any 2.x version from 2.4.0 upward. Pick the newest version that exists and works with your code.

## More guides, and the platform.

Each platform page covers one part of Antideploy: what it does, where it stops and the questions people ask. [See the whole platform](https://antideploy.com/platform), or [all the guides](https://antideploy.com/blog).

- [npm error code E404 is not in this registry](https://antideploy.com/blog/npm-error-404-package-not-in-this-registry): npm cannot find a package by that name. Check the spelling. Agents sometimes invent package names.
- [npm ci can only install packages when your package.json and package-lock.json are in sync](https://antideploy.com/blog/npm-ci-can-only-install-packages-when-package-json-and-package-lock-json-are-in-sync): The lock file does not match package.json. Run npm install and commit the lock file.
- [How to let your agent read logs and fix a failed deploy](https://antideploy.com/blog/how-to-let-your-coding-agent-read-logs-and-fix-a-failed-deploy): The loop: read the reason, read the logs, fix the code, deploy again. And what Antideploy repairs for you.

- [Deployments](https://antideploy.com/platform/deployments)
- [Logs and monitoring](https://antideploy.com/platform/logs-and-monitoring)

Facts on this page were checked against the live platform on 7 October 2026.

## Deploy something. Start with one sentence.

Paste one sentence into your coding agent, click Approve once, and get a live link. No card, no trial clock.

To set this up, give your coding agent this sentence:

```text
Set this project up to deploy on Antideploy. Fetch https://antideploy.com/agent.md and follow it.
```
