On 2020, ഡിസംബർ 21 1:46:31 PM IST, Paolo Greppi <paolo.gre...@libpf.com> wrote:
>Hi Pirate,
>
>what you want to put in ~/.yarnrc.yml could be installed globally to 
>/etc/yarn/config or /etc/yarnrc, but that does not actually fix it.

I agree, I wanted to see if it can be used to update to yarn 2 (so yarnpkg just 
becomes an installer for yarn 2). I was able to use yarn 2 successfully in 
gitlab.

This commit makes the switch to yarn 2.

https://salsa.debian.org/ruby-team/gitlab/-/commit/43df5d0233cef3936b3d5abab334c5fdeeafa717

>I think the real issue is that it does not pull not-yet-cached modules.

I think the failure is after it downloaded. I can see some files in 
~/.cache/yarn created after it is cleaned after yarnpkg add. Could it be a 
problem with extracting the tar ?

>To reproduce:
>
>   # clear cache
>   rm -rf ~/.cache/yarn
>   # actual test
>   cd `mktemp -d`
>   yarnpkg init -y
>   yarnpkg add d3-color
>
>Adding the nodeLinker: "node-modules" option to ~/.yarnrc.yml or the global 
>locations does not help.

It helps if you switch to yarn 2 by running yarnpkg set version berry. See the 
patch linked above for gitlab. It was failing with yarn 1, but worked after 
switching to berry.

We cannot set version to berry globally, it has to be set per project.

>It would be interesting to debug the JavaScript execution after it prints 
>"Fetching packages..."
>

I think we need to revert this patch and fix the error.

https://salsa.debian.org/js-team/node-yarnpkg/-/commit/c122f5c26eefb0b68e0c680eb0d65aae86ef4f9e
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to