yarn icon indicating copy to clipboard operation
yarn copied to clipboard

[Bug?]: intall --verbose --production shows GETs are performed for devDependencies as well

Open iccicci opened this issue 1 year ago • 1 comments

Self-service

  • [ ] I'd be willing to implement a fix

Describe the bug

With yarn --verbose --frozen-lockfile --production, while building a Docker image (i.e. on a machine where yarn never run), I see yarn performs the GETs relative to packages added as devDependencies not only for those added as dependencies.

In the end yarn correctly installs only dependencies as expected, but I'm wondering if there is some resources and time wasting to performs such GETs.

Is there some reason I do not understand to fetch devDependencies when --production is specified or this can be considered as a minor bug?

Thank you

To reproduce

  1. git clone [email protected]:iccicci/cardano-localnet.git
  2. git checkout yarn-issue
  3. make

The output is also saved in build.log.

Environment

yarn run v1.22.19
error Command "dlx" not found.

Both inside and outside the docker build.

iccicci avatar Feb 27 '24 21:02 iccicci

It's not just a question of resource or time waste. The attempt to resolve causes failures with builds when those devDependencies are behind private repos or other details preventing resolution (or install) from occurring in the topical environment. (At least that's the experience so far even following the (yarn v4) yarn workspaces focus --production command documentation.

ryust-ax avatar Oct 14 '24 22:10 ryust-ax