Replies: 8 comments 17 replies
-
Thanks for the suggestion! We might add an option for "Install Command" in Project Settings, however we would need a way to indicate that yarn 2 should be installed before the install script is run, or perhaps it could be apart of the script itself. This is similar to the suggestion in #3896 which has a workaround you can use by modifying your Build Command. |
Beta Was this translation helpful? Give feedback.
-
Any updates on this? It would be very nice if Vercel supported the latest ecosystem tooling |
Beta Was this translation helpful? Give feedback.
-
I just tried to migrate to yarn v2 and while installation step works, the vercel deployment service doesn't pick up that
Locally on my machine I tried |
Beta Was this translation helpful? Give feedback.
-
Hello friends. I wanted to notify you that we have added support for Yarn v2 in our official Runtimes ( If you would like to try out the Yarn v2 support before it hits the stable release channel, you can run the following command if you are using the CLI:
If you are using the Git integration to trigger your deployments, then you can define the Please let me know if it works for you or if you bump into any issues! |
Beta Was this translation helpful? Give feedback.
-
We are using yarn2 on Vercel without any issues with Edit: We are using PnP, seems to work perfectly fine. |
Beta Was this translation helpful? Give feedback.
-
I think Vercel should make it clear that it works with Yarn 2+, as long as you don't use PnP. And Vercel should also cache |
Beta Was this translation helpful? Give feedback.
-
Hey Adam, Kid
the YARN_CACHE_FOLDER=./node_modules/.yarn-cache is nice and works with
pnpm, but actually does not work when no (or not yet) cache is present...
I've opened an issue yarnpkg/berry#2900 and a
repro belgattitude/nextjs-monorepo-example#48.
My feeling about this: vercel should be able to detect yarn 2 and
nodeLinker node_modules from .yarnrc.yml or metadadata keys in yarn.lock...
A call to `yarn config get cacheFolder` would help in that case and could
be used to upload the cache content. But I understand it would add more
complexity to vercel.
In the meantime, I'll try to set up a script to set YARN_CACHE_FOLDER only
if a `nodes_modules/.yarn-state.yml` exists and hope yarn will allow this
in the future.
Thanks you for replies
Happy week
Sébastien
…On Sat, May 15, 2021 at 12:41 PM Adam Haglund ***@***.***> wrote:
If this works it would be better to set
YARN_CACHE_FOLDER=./node_modules/.yarn-cache in the Vercel environment
variables, so it only happens when when building it on the server and not
on your computer
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4223 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB7NVS5KRHCQNLVFEJXM33TNZFVXANCNFSM4MXDBPPQ>
.
|
Beta Was this translation helpful? Give feedback.
-
For those of you who're still struggling with Yarn v4, which changes the global cache behavior compared to v3, you have two options:
The longer explanation is that Yarn v4 forces the use of the global cache folder over the configured cache folder which means that it won't work correctly unless you disable the global cache in addition to setting the cache folder explicitly which is somewhat unintuitive. |
Beta Was this translation helpful? Give feedback.
-
Yarn Berry is currently in release candidate status, and it's a good idea to start thinking about supporting it, as can bring some complications due to Plug N' Play being the default.
The current issue for me is that the
yarn install
command has had breaking changes, and in a repo with the dependencies committed it should runyarn install --immutable --immutable-cache
, and--check-cache
if you want to validate the dependencies before deploying. SourceThere will probably have to be some changes to how the scripts are run as well to make sure that they support plug n play. Read more
Other migration steps can be found here
For now, would it be possible to pass a custom install script in the configuration? It has been suggested in other discussions as well.
Beta Was this translation helpful? Give feedback.
All reactions