yarn install only production package lock code example
Example 1: yarn frozen lockfile
yarn install --frozen-lockfile
Example 2: install dev dependency yarn
yarn add nameOfPackage --dev
yarn install --frozen-lockfile
yarn add nameOfPackage --dev