Open
Description
@netlify/build
runs yarn
on two instances, which are both opt-in behavior:
- When the
@netlify/plugin-functions-install-core
plugin is used, we runyarn
in the functions directory - When the
@netlify/plugin-local-install-core
plugin is used, we runyarn
in any local plugins directory
In both cases, we detect yarn
by looking for the presence of a yarn.lock
. This does not work in many cases, which is why we might want to also check for the presence of a USE_YARN
environment, as suggested in netlify/build-image#440
Also, the command we are running is yarn install --no-progress --non-interactive --cache-folder=/opt/buildhome/.yarn_cache
. According to netlify/build-image#440, this has few issues:
--cache-folder
was replaced with the environment variableYARN_GLOBAL_FOLDER
in Yarn v2--no-progress
and--non-interactive
do not exist anymore