What is the difference between yarn and yarn install?

13,104

Solution 1

Directly taken from the doc:

yarn install is used to install all dependencies for a project. This is most commonly used when you have just checked out code for a project, or when another developer on the project has added a new dependency that you need to pick up.

If you are used to using npm you might be expecting to use --save or --save-dev. These have been replaced by yarn add and yarn add --dev. For more information, see the yarn add documentation.

Running yarn with no command will run yarn install, passing through any provided flags.

Conclusion:

It's not the cmd to determine what to do (whether invoke yarn or yarn install), it's determined by the yarn itself. Plese read more. There are a lot to learn/understand.

Solution 2

Running yarn with no command will run yarn install, passing through any provided flags.

Share:
13,104
gnish9
Author by

gnish9

Updated on June 13, 2022

Comments

  • gnish9
    gnish9 almost 2 years

    I am trying to install an additional plugin on Apache Zeppelin using Helium. The Installation command using by Helium to download this package is below:

    com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'yarn install --fetch-retries=2 --fetch-retry-factor=1 --fetch-retry-mintimeout=5000 --registry=https://registry.npmjs.com/ --https-proxy=http://SVC_Hxxxxxp:***@webguard.xxxxx.no:8080 --proxy=http://SVC_Hxxxop:***@webguard.xxxxx.no:8080' failed. (error code 1)
    

    Version installed:

    node -v
    v8.1.1
    
    
    npm -v
    5.0.3
    
    mvn -v
    Apache Maven 3.3.9
    

    How cmd will be able to identify if it is yarn or yarn install ?