Support for Yarn 2 workspaces

Hi there, I am trying to deploy a static app from a monorepo that uses yarn 2 workspaces and I get the following error during yarn install. It seems that render.com assumes that yarn 1 is in place so it invokes the installation command accordingly. Is there a way to make it work with yarn 2?

Nov 16 05:16:54 PM  ==> Installing dependencies with Yarn...
Nov 16 05:16:55 PM  Unknown Syntax Error: Invalid option name ("--production=false").
Nov 16 05:16:55 PM  $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds]

Thank you in advance.

Answered in slack, but adding here: We don’t support Yarn 2 yet, you can upvote the request at https://feedback.render.com/features/p/add-support-for-yarn-2 to get get notified of status changes.

I understand why Render tries to auto-detect and run the “right” command for static sites (convenience), but the discrepancy is strange, especially because you recommend putting yarn in the build command in many places.

If you provided a way to not auto-run yarn (e.g. look for yarn in the build command, or a flag), then we could setup yarn the way we want, including using Yarn 2. That would also bring static sites in line with how web services operate (i.e. the full install and build is done in the build command).

You can skip the automatic dependency installation and run everything yourself by setting the environment variable SKIP_INSTALL_DEPS=true.

5 Likes

Any updates? it’s been 3 years

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.