# No task has the variant

What "no selected task has a variant named" means and how to fix it.

```text
error: no selected task has a variant named prod; the variants are dev, staging
hint: Choose one of these, or add the variant under [tasks.<name>.variants] in axle.toml.
```

## Why it happens

`axle run` was given `--variant`, but none of the tasks it would run has a variant with that name under `[tasks.<script>.variants]` in an `axle.toml`.

## How to fix it

Use one of the variants the message lists, or add the one you meant:

```toml
[tasks.build.variants.prod]
setEnv = { NODE_ENV = "production" }
```

[Variants](https://axlers.dev/docs/reference/configuration.md#variants) explains how they apply.
