So I tried updating to yarn 2 to speed up my build...
# seed
o
So I tried updating to yarn 2 to speed up my build…they got a lot slower…Like from ~1m to ~5m. The time is going to the top level yarn, takes a few mins every time, so looks like node_modules caching isn’t working:
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 8 packages were already cached, 2688 had to be fetched
➤ YN0000: └ Completed in 3m 20s
This is maybe the 3rd or 4th time this service got built. Any ideas?
j
following @Alex Ketchum
f
Hey @Omi Chowdhury, can you DM me a link to the build?
t
I went back from yarn 2 back to yarn 1
For this reason, didn't feel like digging into it at the time
o
Yeah I’ll probably switch back too, just seems weird that with dependency caching, yarn still takes that long, so wondering if its a seed issue. Since even yarn 1 doesn’t take that long locally
j
I noticed the same behavior when I upgraded ours past yarn 1 as well
f
Just posting back here. When the
yarn install
step takes long, it’s likely due to the node_modules were not cached. We just pushed out an update to Seed and made the cache restore process more transparent.
Now in the build log, you will be able to see what has been restored. And in the case nothing is restored, you can see the reason why.
You will also see what has been saved to the cache at the end of the build log. And in the case nothing is saved, you can see the reason there as well.
@Jacob Hayes, make a couple of builds today and tomorrow. The build log will be able to tell us whether the node_modules cache is used. When there’s a cache miss, let me know and we can dig into it further.
j
@Frank Just had a build where I see
Copy code
Restoring node_modules in the Yarn workspace... Skipped. Cache not found.
Will DM you the build link
Well, I see that there was a successful saving/caching of the node_modules. Let me do another build and see if they get picked up
a
I upgraded to yarn 2 and regretted it. I went back to yarn 1
f
@Jacob Hayes, yup let me know.