consolelog.tools logo

npm to Yarn Converter

Convert npm commands and package-lock.json to Yarn equivalents and vice versa

Conversion Settings

Common Examples:

Quick Reference

npm Commands:

  • npm install → yarn
  • npm install pkg → yarn add pkg
  • npm install -D pkg → yarn add --dev pkg
  • npm run script → yarn script
  • npx command → yarn dlx command

Yarn Commands:

  • yarn → npm install
  • yarn add pkg → npm install pkg
  • yarn add --dev pkg → npm install -D pkg
  • yarn script → npm run script
  • yarn dlx command → npx command

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Frequently Asked Questions - npm to Yarn Converter