Skip to content

Yarn 2/3 devPruning step fetches all dependencies again. #1056

Open
@anthonyProductPlan

Description

@anthonyProductPlan

Describe the bug
When doing the devPruning step on a project with a .yarn/cache checked in with the repo (zero install) the devPruning step wastes time fetching everything since it says it cannot find them in the cache. Skipping the pruning ends up with a larger slug, so you are stuck picking between a large slug or a pointless zero-install setup.

-----> Pruning devDependencies
Running 'yarn heroku prune'
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 207ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @bull-board/api@npm:4.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @bull-board/express@npm:4.11.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0013: │ @bull-board/ui@npm:4.11.0 can't be found in the cache and will be fetched from the remote registry
...
➤ YN0000: └ Completed in 39s 758ms

To Reproduce
Steps to reproduce the behavior:

  1. Trigger a build on a project with Yarn 3 and unset the YARN2_SKIP_PRUNING flag.

Versions (please complete the following information):

  • Heroku Stack: Heroku-22
  • Node Version: 16.19.0
  • NPM or Yarn Version: 3.3.1
  • Buildpack Version: latest

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions