Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
StephenFluin opened this issue Oct 17, 2018 · 7 comments · Fixed by #12625
Closed

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

StephenFluin opened this issue Oct 17, 2018 · 7 comments · Fixed by #12625

Comments

@StephenFluin
Copy link
Contributor

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/[email protected]" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/[email protected]" has incorrect peer dependency "@angular/core@>=6.0.0-beta.0 <7.0.0".
warning " > @angular/[email protected]" has incorrect peer dependency "@angular/common@>=6.0.0-beta.0 <7.0.0".
warning " > [email protected]" has incorrect peer dependency "@angular/compiler@>=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0".
warning " > [email protected]" 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/[email protected]" 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

IgorMinar added a commit to IgorMinar/angular that referenced this issue Oct 19, 2018
This dependency has not been correctly updated and I had to update it manually.

I think the issue is related to angular/angular-cli#12624 which was fixed between CLI RCs and final.
@alfaproject
Copy link

This didn't work for me in one of my projects: https://github.com/alfaproject/rs-progress/tree/v6

P.S.: It also didn't remove the reflect polyfill.

@Splaktar
Copy link
Member

Splaktar commented Oct 19, 2018

I saw this today as well with an ng update @angular/cli to 7.0.1. It did not update "@angular-devkit/build-angular": "^0.9.0", to "@angular-devkit/build-angular": "^0.10.1",.

@Splaktar
Copy link
Member

This was also mentioned in #12646 (comment).

alxhub pushed a commit to angular/angular that referenced this issue Oct 19, 2018
…#26555)

This dependency has not been correctly updated and I had to update it manually.

I think the issue is related to angular/angular-cli#12624 which was fixed between CLI RCs and final.

PR Close #26555
alxhub pushed a commit to angular/angular that referenced this issue Oct 19, 2018
…#26555)

This dependency has not been correctly updated and I had to update it manually.

I think the issue is related to angular/angular-cli#12624 which was fixed between CLI RCs and final.

PR Close #26555
@clydin
Copy link
Member

clydin commented Oct 20, 2018

@Splaktar this was due to a very specific underlying issue that manifested in the following output: Cannot read property 'parseJson' of undefined.

What you are experiencing is most likely this: #12647

@Splaktar
Copy link
Member

@clydin thank you for the clarification. I've moved some of the comments over to that issue.

@Splaktar
Copy link
Member

It might be helpful to update the topic of this issue to ng update: Cannot read property 'parseJson' of undefined to avoid more people posting that they are seeing issues with build-angular.

@clydin clydin changed the title ng update is failing to update build-angular dependency ng update: Cannot read property 'parseJson' of undefined Oct 20, 2018
sculove pushed a commit to sculove/angular that referenced this issue Nov 2, 2018
…angular#26555)

This dependency has not been correctly updated and I had to update it manually.

I think the issue is related to angular/angular-cli#12624 which was fixed between CLI RCs and final.

PR Close angular#26555
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this issue Jan 3, 2019
…angular#26555)

This dependency has not been correctly updated and I had to update it manually.

I think the issue is related to angular/angular-cli#12624 which was fixed between CLI RCs and final.

PR Close angular#26555
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants