Skip to content

Yarn handling in the Dockerfile doesn't account for modern installs #138

@jamesmeneghello

Description

@jamesmeneghello

During the build, the dockerfile will pull across the node_modules directory to the final image. This has a few ramifications:

  • Assumes Yarn 1/2 is being used
  • Yarn 3 pnp stores packages in .yarn instead
  • Yarn 3 can be set to use the node_modules linker which still stores packages in node_modules, but requires overriding through .yarnrc.yml, which is also not copied across in the Dockerfile

This should probably be a config option (yarn classic/modern):

Classic: copies node_modules across
Modern: copies .yarn and .yarnrc.yml, and respects node-linker, which means copying either node_modules or .yarn across

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions