What is the difference between yarn and yarn install?
Asked Answered
N

2

43

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 ?

Nolen answered 10/12, 2019 at 10:35 Comment(0)
M
43

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

Manatee answered 17/3, 2020 at 20:14 Comment(1)
reference: classic.yarnpkg.com/lang/en/docs/cli/installLogia
V
34

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.

Voroshilovsk answered 10/12, 2019 at 10:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.