Skip to content

A task failed

error: @acme/ui#build failed with exit code 2
hint: Run axle run @acme/ui#build --only to see it by itself.

The script ended with an error. Its own output, above the message, says why. Unless you pass --continue, Axle stops the other tasks.

In strict environment mode, the default, a script only sees the environment variables Axle passes on and those axle.toml lists. If it failed and some variables were left out, the hint says how many:

hint: Run axle run @acme/ui#build --only to see it by itself. It ran without 12 environment variables that strict mode leaves out; if it needs one, list it under env in axle.toml.

Fix what the script reports. If it needs a variable strict mode left out, list it under the task’s env or passThroughEnv, or globalEnv or globalPassThroughEnv for every task, in axle.toml, or try --env-mode loose to check. Axle’s own exit code is the first failing script’s.