Skip to content

When used with Lerna, a cache directory is created in several different locations #82

@damienwebdev

Description

@damienwebdev
  • Operating System: MacOS v10.14.3
  • Node Version: v10.15.0
  • NPM Version:6.7.0
  • Webpack Version:
@angular-devkit/[email protected]
  ├── [email protected] 
  └─┬ [email protected]
    └── [email protected]  deduped

Expected Behavior

When using lerna for hoisted package management in a monorepo, when I do run lerna run build and it runs the build script in each of my packages, the resulting cache directory should be in my root node_modules of my project.

Actual Behavior

When using lerna for hoisted package management, when I do run lerna run build and it runs the build script in each of my packages, ng build runs webpack with terser-webpack-plugin with the cache flag set to true. This generates a new node_modules directory in each of my source directories.

How Do We Reproduce?

You can reproduce fairly easily by cloning: https://github.com/graycoreio/daffodil and then:

npm install -g lerna @angular/cli
lerna run build
look in apps/daffio/ and see a new node_modules folder

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