yarn install no optional
snippet in c

yarn frozen lockfile

user3959

yarn install --frozen-lockfile

install dev dependency yarn

user5671

yarn add nameOfPackage --dev

yarn install no optional

user5510

yarn install --ignore-optional