Gatsby.js, yarn workspaces and caching node_modules

Thanks a lot.
I’m facing a strange problem. I specify base directory as a root.
I found out yarn installs almost all modules into root node_modules folder.

I did do experiment on my local machine:

  1. I removed all node_modules folders including in all sub packages.
  2. I executed yarn install in the root folder. It took around one minute.
  3. I removed non-root node_modules (as if they weren’t cached).
  4. I executed yarn install in the root folder one more time. It took around 10 second.

So, on my local machine subsequent executing yarn install is much more faster than the first time, but on Netlify’s system it always takes the same time (about one minute).
It seems root node_modules isn’t being cached.