Skip to content

Adding a dependency with yarn while serving the app breaks ngcc generated files import #16397

@yjaaidi

Description

@yjaaidi

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 8.2.14

Description

When running Angular 9 with ng serve then installing a dependency with yarn, yarn will overwrite angular dependencies' package.json files and remove __ivy_ngcc__ files generated by ngcc when ng serve starts.
This produces an error on ng serve as it can't find IVy generated files like ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js

Maybe ng serve could watch for these files and rebuild them if they disappear?

🔥 Exception or Error


ERROR in ./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js
Module build failed: Error: ENOENT: no such file or directory, open '/Users/r/Desktop/demo/node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js'

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions