Добавить пряжу зависимости Dev
yarn add -D package
//or
yarn add --dev package
Sleep Overflow
yarn add -D package
//or
yarn add --dev package
// for specific versions
yarn add package-name@1.2.3
yarn set version <version>