corepack

Node.js package manager bridge supporting npm, yarn, and pnpm

brewmacoslinux
Try with needOr install directly
Source

About

Package acting as bridge between Node projects and their package managers

Commands

corepack

Examples

Enable corepack to manage package managers$ corepack enable
Prepare and install the yarn version specified in package.json$ corepack prepare yarn@3.6.0 --activate
Use pnpm as specified in the project's packageManager field$ corepack use pnpm@8.0.0