- Yarn 4.0.0-rc.23: 2+ minutes (constant yarn cache is preserved between lock changes: cache saved in .next/cache/yarn)
- Pnpm 7.13.x: 4+ mins (cold cache) / 3+ minutes (warm cache)
PS: add
NEXT_DEBUG_FUNCTION_SIZE
=1 in the vercel envs/
Support for peerDependencies and peerDependenciesMeta.optional seems consistent for Yarn 1/2/3, PNPM 6 and NPM 8.
Exception: NPM v7 always install the peerDependencies, which has the consequence to download deps that might not be needed (the --legacy-peer-deps can help).
On a (cached) github action. pnpm7 ±50s (244Mb store cache) / yarn4-nm ±75s (190Mb yarn install cache)
Tests made with pnpm 7+ and yarn 4.0.0rc (node-modules/pnp) based on https://github.com/belgattitude/nextjs-monorepo-example. Tests have been made in a way to evaluate CI performance. There's other perf bench: pnpm or yarn. Conclusions are pretty similar. This benchmark helped to create this yarn install composite action
Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).
pnpm v7 or v8 (not using pnpm ? see the corresponding yarn action gist)
Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).
Yarn 3+/4+ with nodeLinker: node-modules. (Not using yarn ? see the corresponding pnpm 7/8+ action gist)