Skip to content

schematics(update): v9 migration fails due to chalk #17764

@Splaktar

Description

@Splaktar

Reproduction

https://github.com/parys/MyLFC/tree/poc/angular9/src/MyLiverpool.Web.WebApiNext/ClientApp

Steps to reproduce:

  1. Remove postinstall script and update core and universal (commit)
  2. Run ng update @angular/material --migrate-only --from 8 --to 9
** Executing migrations of package '@angular/material' **
❯ Updates Angular Material to v9
Cannot read property 'yellow' of undefined
✖ Migration failed. See above for further details.
  1. npm i --save-dev chalk (installs 3.0.0)
  2. Run ng update @angular/material --migrate-only --from 8 --to 9
** Executing migrations of package '@angular/material' **
❯ Updates Angular Material to v9
Cannot read property 'yellow' of undefined
✖ Migration failed. See above for further details.
  1. npm i --save-dev [email protected] (commit)
  2. Run ng update @angular/material --migrate-only --from 8 --to 9
  3. Successful update

Expected Behavior

chalk should not be required as a dev or peer dependency. Angular CLI builders currently appear to use 2.4.2.
The migration should succeed.

Actual Behavior

Exception as indicated above.

Environment

  • Angular: 9.0.0-rc.3
  • CDK/Material: 9.0.0-rc.2
  • Browser(s): N/A
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS Catalina

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions