yarnpkg - How to use Yarn PnP Zero-Installs in CI when platform-specific packages are required? - Stack Overflow

admin2025-04-18  4

I'm changing a project to use Zero-Installs (where .yarn/cache is committed). It works on local because the process is yarn and it builds the .yarn/cache and runs the post-install scripts necessary to create the platform-specific unplugged dependencies.

However, I've found no way to force CI to generate the unplugged dependencies without doing a full yarn install. I've tried yarn install --immutable-cache hoping that it wouldn't make network requests, but it still does. Is there an alternate command that can be run to force all the post-install scripts in deps to run?

The necessity to yarn in CI defeats the entire purpose of zero-installs.

转载请注明原文地址:http://www.anycun.com/QandA/1744943953a89829.html