Skip to content

ng update: Cannot read property 'parseJson' of undefined #12624

@StephenFluin

Description

@StephenFluin

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [x] update

Versions

v6 -> v7 update
before:

Angular CLI: 6.1.5
Node: 10.11.0
OS: linux x64
Angular: 6.1.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.5
@angular-devkit/build-angular     0.7.5
@angular-devkit/build-optimizer   0.7.5
@angular-devkit/build-webpack     0.7.5
@angular-devkit/core              0.7.5
@angular-devkit/schematics        0.7.5
@angular/cdk                      6.4.7
@angular/cli                      6.1.5
@angular/material                 6.4.7
@ngtools/webpack                  6.1.5
@schematics/angular               0.7.5
@schematics/update                0.7.5
rxjs                              6.3.2
typescript                        2.9.2
webpack                           4.9.2

after:

Angular CLI: 7.0.0-rc.3
Node: 10.11.0
OS: linux x64
Angular: 7.0.0-rc.1
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.7.5
@angular-devkit/build-angular     0.7.5
@angular-devkit/build-optimizer   0.7.5
@angular-devkit/build-webpack     0.7.5
@angular-devkit/core              7.0.0-rc.3
@angular-devkit/schematics        7.0.0-rc.3
@angular/cdk                      6.4.7
@angular/cli                      7.0.0-rc.3
@angular/material                 6.4.7
@ngtools/webpack                  6.1.5
@schematics/angular               7.0.0-rc.3
@schematics/update                0.9.0-rc.3
rxjs                              6.3.3
typescript                        3.1.3
webpack                           4.9.2

Repro steps

The log given by the failure

warning " > @angular/cdk@6.4.7" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/material@6.4.7" has incorrect peer dependency "@angular/core@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/material@6.4.7" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > codelyzer@4.4.4" has incorrect peer dependency "@angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > codelyzer@4.4.4" has incorrect peer dependency "@angular/core@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning "@angular-devkit/build-angular > @ngtools/webpack@6.1.5" has incorrect peer dependency "typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 || ~2.8.0 || ~2.9.0".
Cannot read property 'parseJson' of undefined

The update of CLI and Core succeeds despite the red error, but build-angular is not updated to the correct version and Angular Material and the CDK are not update.

Desired functionality

ng update succeeds

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