The command 'yarn --v' also initiates 'yarn install' and installs packages automatically. Why is this happening?

The git bash session is as shown below. I entered the command 'yarn --v', and everything else camp up. What is the issue?

Git bash session

Git bash session.png

728x90

1 Answers The command 'yarn --v' also initiates 'yarn install' and installs packages automatically. Why is this happening?

The command should be yarn -v or yarn --version As you ran yarn with incorrect command line arguments the current implementation of Yarn silently ignores them.

The Yarn documentation states that running yarn with no args will run yarn install. This is why it starts to install

5 months ago