Skip to content

clean previous ngcc ivy entrpoints works when running ng update #35082

@elvisbegovic

Description

@elvisbegovic

🚀 Feature request

Command

  • serve
  • update

Description

Actually updating a project with ng update is not straightforward, if an update exist it update package.json versions and run npm i correctly. But now running ng serve always throw this known error:

ERROR in The ngcc compiler has changed since the last ngcc build.
Please remove "C:/Users/e.../ngcc-has-changed/node_modules" and try again.

Here we realize we need again remove node_modules and rerun npm i
This task is long and not automatic, or something escapes me?

Repro

Following my repro project which has fixed ng version to 9.0.0-rc.9

  1. run git clone https://github.com/elvisbegovic/ngcc-has-changed.git && cd ngcc-has-changed && npm i && ng s
  2. kill ng s with Ctrl+C
  3. run ng update --next @angular/cli @angular/core --allow-dirty && ng s
  4. error thrown

Describe the solution you'd like

Clean previous ngcc ivy entrypoints works in node_modules during ng update command, so they could be again compiled when rerun ng s after update finish.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions