Skip to content

Fix support for Yarn Plug'n Play in the plugins execution #1535

Open
@ehmicky

Description

@ehmicky

@netlify/build runs yarn on two instances, which are both opt-in behavior:

  • When the @netlify/plugin-functions-install-core plugin is used, we run yarn in the functions directory
  • When the @netlify/plugin-local-install-core plugin is used, we run yarn 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 variable YARN_GLOBAL_FOLDER in Yarn v2
  • --no-progress and --non-interactive do not exist anymore

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions