# A before hook failed

What "the before hook failed, so no task ran" means and how to fix it.

```text
error: the before hook "node scripts/login.mjs" failed with exit code 4, so no task ran
hint: Run the command by itself to see what went wrong, or fix it under [hooks] in axle.toml.
```

## Why it happens

A command under `before` in `[hooks]` ended with an exit code other than 0, or couldn't start. Axle runs these before any task, so it stops there and exits with the command's exit code.

## How to fix it

Run the command by itself at the repository root to see what went wrong. Its output is printed above the error. If the command shouldn't stop the run when it fails, make it exit with 0.
