@angular/core/testing imports @angular/compiler without it being a listed dependency #38096
Labels
area: build & ci
Related the build and CI infrastructure of the project
area: core
Issues related to the framework runtime
area: dev-infra
Issues related to Angular's own dev infra (build, test, CI, releasing)
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone
馃悶 bug report
Affected Package
@angular/core
Is this a regression?
No
Description
@angular/core/testing
imports@angular/compiler
, which results in an error in environments where dependencies are enforced strictly, e.g. yarn 2's PnP.There's a simple workaround in yarn 2, via package extensions in the
.yarnrc.yml
. The repro shows this as well. As such this isn't very blocking.The actual solution would be to add an (optional) peer dependency on
@angular/compiler
in@angular/core
. Optional peer dependencies are supported in yarn, pnpm, and npm >= 6.11. I'm not sure about cnpm.馃敩 Minimal Reproduction
yarn ng test
to see the issue..yarnrc.yml
, runyarn
and tryyarn ng test
again.馃敟 Exception or Error
馃實 Your Environment
Angular Version:
Anything else relevant?
Using yarn 2 (aka berry) with the PnP linker
The text was updated successfully, but these errors were encountered: