What exactly these two do, where to use them ?
yarn install
yarn build
In a nutshell, yarn install
is the command used to install all dependencies for a project, usually allocated in the package.json file. In most scenarios it is because you cloned a project and need its dependencies installed to run it.
On the other hand, yarn build
is not a built-in command in the Yarn package manager. Looking at your question, it seems like you are running some #reactjs project, which might have defined a build
command in its package.json file.
I hope this clarifies your doubt, but for a complete answer, please provide an example of what is your specific scenario.
Also be aware that when running custom scripts like build, test, deploy, etc. it is recommended tu use the yarn run [script]
command as stated in the Yarn docs, in your case yarn run build
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With