# concurrently "command not found" / Non-Zero Exit - Fix Parallel Scripts in CI

> Fix concurrently failing in CI - "concurrently: not found", or one parallel command exiting non-zero failing the whole run. Install it, quote commands, and tune kill/success behavior.

Source: https://latchkey.dev/learn/node-js/npm-concurrently-command-not-found  
Updated: 2026-06-25

concurrently runs several npm commands in parallel. It fails in CI when the binary itself is missing (a stripped devDependency), or when one of the parallel commands exits non-zero and concurrently reports the whole run as failed.

## Diagnose it: the shell in CI is not your shell

Package scripts run under a different shell, a different PATH, and a non-interactive environment on a runner. Most scripts that fail only in CI are relying on something the login shell gave them locally: a tool on PATH, an environment variable from a dotfile, or a TTY.

```Terminal
# what the script can actually see
npm run env | grep -E "^(PATH|NODE_ENV|CI)=" 

# is the binary on PATH for the script, not just for you?
npm exec -- which <tool> || echo "not resolvable from npm scripts"

# run the exact script with tracing
sh -x -c "$(node -p "require('./package.json').scripts.build")"
```

> A tool installed globally on your machine but only a devDependency in the repo works locally and fails in CI. Call it through `npm exec` or a `node_modules/.bin` path rather than assuming it is on PATH.

## Make failures fail the job

A multi-command script can report success while a middle command failed, which produces the worst kind of CI result: a green build that shipped something broken.

```.github/workflows/ci.yml
# pipefail is NOT set by default in every runner shell
- name: Build
  shell: bash
  run: |
    set -euo pipefail
    npm run build | tee build.log
```

> Without `pipefail`, the exit status of a pipeline is the status of the LAST command, so `failing-command | tee log` reports success. Piping build output to a log file is exactly where this bites.

## FAQ

### What causes concurrently "command not found" / Non-Zero exit?

There are 2 common causes: concurrently not installed for this job and one parallel command failed. concurrently is a devDependency; a --omit=dev install strips it, so the binary is missing (exit 127).

### How do I fix concurrently "command not found" / Non-Zero exit?

There are 2 fixes depending on which cause you have: install it and read the failing child and tune kill/success behavior. Work through them in order, since the first is the most common.

### What does concurrently "command not found" / Non-Zero exit actually mean?

A concurrently step fails with concurrently: not found, or it runs but exits non-zero because one of the parallel tasks failed.

### How do I stop concurrently "command not found" / Non-Zero exit happening again?

Keep concurrently in devDependencies and installed for the job. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
