# yarn: command not found

**Code:** `yarn not found` · **Category:** npm · **Seen on:** npm

Yarn isn’t installed (or not enabled through Corepack) on this machine.

## Meaning

Node 16.10+ ships Corepack, which provides yarn/pnpm when enabled. Otherwise install Yarn globally.

## Common causes

- Fresh machine/CI image
- Corepack not enabled
- PATH missing global npm bin

## Quick fix

1. corepack enable
2. Or npm install -g yarn

## Detailed fix by platform

### npm

1. `corepack enable && yarn --version`

## How to diagnose

1. **Corepack** — Enabled?
2. **PATH** — Global bin on PATH?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/npm/yarn-command-not-found)
