What is equivalent to "npm install --save" in Yarn?

I use Yarn to install the dependencies of my project. What is equivalent to "npm install --save" in Yarn to update an entry in my package.json file? I can use "npm install -save" here, but I want to use yarn as much as possible to improve performance and avoid confusion between npm and yarn.

+6
source share
1 answer

The yarn equivalent to npm install <name> --save is:

 yarn add <name> 

Here's a link to the docs for a complete list of commands compared to npm .

+7
source

Source: https://habr.com/ru/post/1011481/


All Articles