yarn not found 📦 npm

yarn: command not found

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

Seen on: npm

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?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.