add dev dependency yarn

JavaScript
yarn add -D package
//or
yarn add --dev package
Source

Also in JavaScript: