Search code examples
yarnpkg

How to install multiple yarn packages using `add`?


Using npm install npm install all the packages in the package.json. But it looks like you need to specify each package when using yarn add according to https://yarnpkg.com/en/docs/cli/add.

yarn add package-name installs the “latest” version of the package.

This can't be correct, can it?


Solution

  • Just add spaces between packages.
    e.g.:

    yarn add redux react-redux redux-starter-kit
    

    If you want a replacement for npm install you can use the yarn or yarn install command.