Skip to content

ng upgrade: incompatible peer dependency error prevents from auto-updating #10875

Closed

Description

@juristr

Versions

Angular CLI: 6.0.1
Node: 9.11.1
OS: darwin x64
Angular: 5.2.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.1
@angular-devkit/build-angular     0.6.1
@angular-devkit/build-optimizer   0.6.1
@angular-devkit/core              0.6.1
@angular-devkit/schematics        0.6.1
@angular/cli                      6.0.1
@ngtools/webpack                  6.0.1
@schematics/angular               0.6.1
@schematics/update                0.6.1
rxjs                              5.5.10
typescript                        2.5.3
webpack                           4.6.0


macOS 10.11.6

Repro steps

  • Clone the upgrade branch of repo https://github.com/juristr/ng-upgrade-test
  • yarn install (or npm install => I used yarn)
  • Try upgrading the Angular dependencies, using for instance ng update @angular/core. I already performed the @angular/cli upgrade command which adjusts the angular.json etc.

Observed behavior

<!-- Normally this includes a stack trace and some more information. -->

I get the following output

❯ ng update @angular/core
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.8", would install "2.5.3")
Incompatible peer dependencies found. See above.

Desired behavior

It should automatically update the Angular dependencies as well as RxJS and TypeScript (as described in the update.angular.io guide).

Mention any other details that might be useful (optional)

Activity

  1. devssharma commented on Jun 3, 2018

    @devssharma

    I could have faced incompatible peer dependency issues when i ran the command ng update @angular/core to update the core library of the existing angular project.

    Issues

    Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires ">=5.0.0-rc.0 <6.0.0||>=4.0.0 <5.0.0", would install "6.0.0").
    Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0-rc.0 <6.0.0||>=2.3.1 <3.0.0||>=4.0.0-beta <5.0.0", would install "6.0.0").
    Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=5.0.0-rc.0 <6.0.0||>=2.3.1 <3.0.0||>=4.0.0-beta <5.0.0", would install "6.0.0").

    in second time i used the following command to update the core library
    ng update @angulsar/core --next but still there an issue.

    issue had fix when i use the following command with --force flag,
    ng update @angular/core --next --force

    now, my project library has been updated from version 4 to 6. Well done :)

    Good Luck !!!

  2. HarryWang74 commented on Jun 4, 2018

    @HarryWang74

    ng update @angular/core --next --force works for me

  3. Sharondio commented on Jun 13, 2018

    @Sharondio

    I'm doing a fresh install of my npm modules, and running into this issue:

    $ npm install -g @ngrx/schematics@latest
    npm WARN @ngrx/schematics@6.0.1 requires a peer of @angular-devkit/core@^0.6.0 but none is installed. You must install peer dependencies yourself.
    npm WARN @ngrx/schematics@6.0.1 requires a peer of @angular-devkit/schematics@^0.6.0 but none is installed. You must install peer dependencies yourself.
    

    But angular-devkit/schematics@0.6.8 is installed. Is using --force still the recommended workaround?

  4. clydin commented on Jun 13, 2018

    @clydin
    Member

    @Sharondio You're installing @ngrx/schematics@latest globally. If that is intentional then the peer dependencies of the package would also need to be installed globally.

  5. Sharondio commented on Jun 13, 2018

    @Sharondio

    @clydin They are installed globally. Still getting error.

  6. clydin commented on Jun 13, 2018

    @clydin
    Member

    If npm ls -g --depth=0 doesn't show the warnings then everything should be fine.
    Please note that this is actually an npm issue (and possible a defect) and not a CLI issue.

  7. matheo commented on Jul 27, 2018

    @matheo

    So I figured out that ng update --all doesn't work as expected,
    so you better upgrade everything in order:

    yarn global @angular/cli
    ng update @angular/cli
    yarn upgrade tsickle
    ng update @angular/core
    ng update @angular/material
    ng update rxjs
    yarn add @angular-devkit/schematics@^0.6.0 --dev
    ng update @ngrx/store
    ng update @nrwl/nx
    

    Note that I had to update some dependencies because @angular/core installs typescript 2.9.2 and the version I had of tsickle didn't supported it:

    Package "tsickle" has an incompatible peer dependency to "typescript" (requires ">=2.4.2 <2.9", would install "2.9.2").
    

    and also @ngrx/store had a missing dependency:

    Package "@ngrx/schematics" has a missing peer dependency of "@angular-devkit/schematics" @ "^0.6.0".
    

    Thanks for the great work!

  8. Newbie012 commented on Aug 2, 2018

    @Newbie012

    I just ran

    ng update --all --next --force
    

    and the output was (ok):

    Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0", would install "6.1.0-rc.3")
    Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.1.0-dev.20180802")
    Package "@angular/cdk" has an incompatible peer dependency to "@angular/common" (requires ">=6.0.0-beta.0 <7.0.0" (extended), would install "6.1.0-rc.3").
    Package "codelyzer" has an incompatible peer dependency to "@angular/compiler" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "6.1.0-rc.3").
    Package "codelyzer" has an incompatible peer dependency to "@angular/core" (requires ">=2.3.1 <7.0.0 || >6.0.0-beta <7.0.0" (extended), would install "6.1.0-rc.3").
    Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.1.0-dev.20180802").
    Updating package.json with dependency karma-jasmine-html-reporter @ "1.2.0" (was "0.2.2")...
    Updating package.json with dependency jasmine-core @ "3.1.0" (was "2.99.1")...
    Updating package.json with dependency codelyzer @ "4.4.2" (was "4.2.1")...
    Updating package.json with dependency protractor @ "5.4.0" (was "5.3.2")...
    Updating package.json with dependency ts-node @ "7.0.0" (was "5.0.1")...
    Updating package.json with dependency @angular/animations @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/compiler-cli @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/language-service @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/http @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/platform-browser @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/common @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/compiler @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/forms @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/core @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/router @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @angular/platform-browser-dynamic @ "6.1.0-rc.3" (was "6.0.9")...
    Updating package.json with dependency @types/node @ "10.5.5" (was "8.9.5")...
    Updating package.json with dependency karma @ "2.0.5" (was "1.7.1")...
    Updating package.json with dependency typescript @ "3.1.0-dev.20180802" (was "2.7.2")...
    Updating package.json with dependency @angular-devkit/build-angular @ "0.8.0-beta.0" (was "0.6.8")...
    UPDATE package.json (1662 bytes)
    npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
    npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
    npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
    npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
    npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
    npm WARN deprecated buildmail@4.0.1: This project is unmaintained
    
    > uws@9.14.0 install ...\node_modules\uws
    > node-gyp rebuild > build_log.txt 2>&1 || exit 0
    
    npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, lstat '...\node_modules\fsevents\node_modules'
    npm WARN tslint@5.9.1 requires a peer of typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev but none is installed. You must install peer dependencies yourself.
    npm WARN @angular/compiler-cli@6.1.0 requires a peer of typescript@>=2.7.2 <2.10 but none is installed. You must install peer dependencies yourself.
    npm WARN @ngtools/webpack@6.2.0-beta.0 requires a peer of typescript@~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0 || ~2.8.0 || ~2.9.0 but none is installed. You must install peer dependencies yourself.
    npm WARN tsickle@0.30.0 requires a peer of typescript@>=2.4.2 <2.9 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    added 120 packages from 165 contributors, removed 48 packages, updated 77 packages, moved 3 packages and audited 16744 packages in 47.871s
    found 6 vulnerabilities (1 low, 5 moderate)
    run `npm audit fix` to fix them, or `npm audit` for details
    
  9. prasanthlouis commented on Aug 31, 2018

    @prasanthlouis

    If anyone's still running into this error you could try running

    npm i --save-dev codelyzer@4.0.1 before running ng update @angular/core

    instead of forcing ng update --next --force which ignores those warnings and installs beta packages.

  10. asmaa3107 commented on Sep 2, 2018

    @asmaa3107

    it gave me a successful serve but in browser I got this error

    AppComponent.html:1 ERROR TypeError: (intermediate value).switchMap is not a function
        at new AngularFireAuth (auth.js:21)
        at _getAngularFireAuth (auth.module.js:6)
        at _callFactory (core.js:16720)
        at _createProviderInstance (core.js:16676)
        at resolveNgModuleDep (core.js:16636)
        at _createClass (core.js:16709)
        at _createProviderInstance (core.js:16673)
        at resolveNgModuleDep (core.js:16636)
        at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:17345)
        at resolveDep (core.js:17716) 
    
  11. leonardox12 commented on Sep 4, 2018

    @leonardox12

    ng update @angular/cli@version --force it worked for me

  12. sameersayani commented on Sep 8, 2018

    @sameersayani

    ng update --all --force this worked for me.

  13. odahcam commented on Oct 19, 2018

    @odahcam

    Happening on update to Angular 7 and TypeScript 3.1 too.

  14. sameersayani commented on Oct 19, 2018

    @sameersayani
  15. odahcam commented on Oct 19, 2018

    @odahcam

    The update with --force does work, but some packages like ng-packagr breaks due to tsickle version.

  16. demonguru18 commented on Oct 30, 2018

    @demonguru18

    ng update @angular/cli this will do the trick

  17. odahcam commented on Oct 30, 2018

    @odahcam

    At this time, just the update as @demonguru18 said should work.

  18. demonguru18 commented on Oct 30, 2018

    @demonguru18

    Here is an Starter Project I created for Asp.net Core 2.1, Angular 7.0.3 and Bootstrap 4.1.3 You can download this project and start. In case you want to start from scratch
    https://github.com/demonguru18/Angular7DotNetCore2.1BootStrap4

    If updating old project, follow this

    first run ng update --all
    then run ng update @angular/cli
    Make sure you have update version of Jquery to run Bootsrap 4
    Cheers 👍

    ** If you get an error saying,

    Global Angular CLI version greater than local
    Then first run this command:
    npm install --save-dev @angular/cli@latest
    then run
    ng --update @angular/cli@latest

  19. cs-StephanieDM commented on Dec 3, 2018

    @cs-StephanieDM

    For Angular 7: first upgrade to codelyzer@4.5.0: https://github.com/mgechev/codelyzer/blob/master/CHANGELOG.md, after that, you can run the ng update @angular/cli command

  20. arulsuju commented on Jan 8, 2019

    @arulsuju

    Not sure if it's the same thing, but I'm getting errors like:

    Package "bootstrap" has a missing peer dependency of "jquery" @ "1.9.1 - 3".
    

    I'm using the bootstrap SCSS framework but have no intentions of ever including jQuery ofc. I dunno if this is a problem with bootstrap itself that it has jquery as a peerDep or if the problem is that CLI throws for peer dep WARN.

    Is it perhaps possible to just force the ng update --all?

    try

    npm install --save bootstrap

  21. demonguru18 commented on Jan 8, 2019

    @demonguru18

    Hi you need to upgrade jQuery to use bootstrap 4. In you package manager file change the version of jQuery. Like in my libman.json file i have it like this

    {
      "version": "1.0",
      "defaultProvider": "cdnjs",
      "libraries": [
        {
          "library": "twitter-bootstrap@4.1.3",
          "destination": "wwwroot/lib/bootstrap/dist",
          "files": [
            "js/bootstrap.min.js",
            "js/bootstrap.js",
            "css/bootstrap.min.css",
            "css/bootstrap-reboot.css",
            "css/bootstrap-grid.css",
            "css/bootstrap.css"
          ]
        },
        {
          "library": "jquery@3.3.1",
          "destination": "wwwroot/lib/jquery/dist",
          "files": [
            "jquery.min.js",
            "jquery.js"
          ]
        },
        {
          "library": "popper.js@1.14.4",
          "destination": "wwwroot/lib/popper.js/dist",
          "files": [
            "esm/popper-utils.min.js",
            "esm/popper.js",
            "umd/popper-utils.min.js",
            "umd/popper.min.js",
            "popper.min.js",
            "popper-utils.min.js"
    
          ]
        }
      ]
    }
    
  22. removed
    needs: discussionOn the agenda for team meeting to determine next steps
    on Jan 24, 2019
  23. sanjaytarani0 commented on Feb 5, 2019

    @sanjaytarani0

    I've tried executing ng update --all --force but I still get the error

    Tried:
    ng update @angular/core --force

    UPDATE package.json (1579 bytes)

    npm WARN rollback Rolling back node-pre-gyp@0.10.0 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\Ben\Projects\QuixxiStaging\node_modules\fsevents\node_modules'
    npm WARN angular2-ladda@2.0.0 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN codelyzer@4.0.1 requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN codelyzer@4.0.1 requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN codelyzer@4.0.1 requires a peer of @angular/platform-browser-dynamic@^2.3.1 || >=4.0.0-beta <6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN codelyzer@4.0.1 requires a peer of @angular/platform-browser@^2.3.1 || >=4.0.0-beta <6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN codelyzer@4.0.1 requires a peer of @angular/common@^2.3.1 || >=4.0.0-beta <6.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  24. codemcu commented on Feb 9, 2019

    @codemcu

    Hi, be careful with this command,
    ng update @ angular / core --next --force,
    I have used it to update from Angular 4 to 7 and now I have version 8.0.0-beta.3

  25. briancodes commented on May 5, 2019

    @briancodes

    @codemcu The --next flag is probably not what people are expecting. From the Angular docs

    --next=true|false Use the largest version, including beta and RCs

  26. adhivenkatesh commented on May 12, 2019

    @adhivenkatesh

    when bootstrapping angular application

    What are the order priorites while bootstrapping and main-usage of those file, if any one knows Please clearly explain.

    index.js
    main.ts,

    package.json,

    tsconfig.json,

    tsconfig.app.json,

    tsconfig.spec.json,

    angular.json

  27. Splaktar commented on May 14, 2019

    @Splaktar
    Contributor

    @adhivenkatesh the Angular Bootstapping Guide might be helpful as well as the Project File Structure Guide. However, I'm not sure that they address that exact question.

  28. adhivenkatesh commented on May 14, 2019

    @adhivenkatesh

    Yes , splaktar, good day, thanks for your revert, i will go through the angular bootstrapping guide, thank you.

  29. adhivenkatesh commented on May 14, 2019

    @adhivenkatesh

    Hi i think some of the files corrected i am using angular 7 version ,
    i have tried in many angles deleted directory and remove ng_modules and installed npm command also nothing happened , here i also used npm cache clean --force , then remove ng_modules then npm install ,
    i have created 3 new projects and again getting the same issue
    please help with best solution ,

    ======================= error =============
    ERROR in node_modules/rxjs/src/internal/scheduled/scheduled.ts(25,40): error TS2345: Argument of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerLike' is not assignable to parameter of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerLike'.
    Types of property 'schedule' are incompatible.
    Type '(work: (this: import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerAction, state?: T) => void, delay?: number, state?: T) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription' is not assignable to type '(work: (this: import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerAction, state?: T) => void, delay?: number, state?: T) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription'.
    Types of parameters 'work' and 'work' are incompatible.
    The 'this' types of each signature are incompatible.
    Type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerAction' is not assignable to type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerAction'.
    Types of property 'schedule' are incompatible.
    Type '(state?: T, delay?: number) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription' is not assignable to type '(state?: T, delay?: number) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription'.
    Type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription' is not
    assignable to type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription'.
    Property '_parentOrParents' is protected but type 'Subscription' is not a class derived from 'Subscription'.
    node_modules/rxjs/src/internal/scheduled/scheduled.ts(27,37): error TS2345: Argument of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerLike' is not assignable to parameter of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerLike'.
    node_modules/rxjs/src/internal/scheduled/scheduled.ts(29,35): error TS2345: Argument of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerLike' is not assignable to parameter of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerLike'.
    node_modules/rxjs/src/internal/scheduled/scheduled.ts(31,38): error TS2345: Argument of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerLike' is not assignable to parameter of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerLike'.
    node_modules/rxjs/src/internal/observable/from.ts(116,29): error TS2345: Argument of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerLike' is not assignable to parameter of type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerLike'.
    Types of property 'schedule' are incompatible.
    Type '(work: (this: import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerAction, state?: T) => void, delay?: number, state?: T) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription' is not assignable to type '(work: (this: import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerAction, state?: T) => void, delay?: number, state?: T) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription'.
    Types of parameters 'work' and 'work' are incompatible.
    The 'this' types of each signature are incompatible.
    Type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/types").SchedulerAction' is not assignable to type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/types").SchedulerAction'.
    Types of property 'schedule' are incompatible.
    Type '(state?: T, delay?: number) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription' is not assignable to type '(state?: T, delay?: number) => import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription'.
    Type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/src/internal/Subscription").Subscription' is
    not assignable to type 'import("D:/AngularProjects/AngularRouting/Routing/node_modules/rxjs/internal/Subscription").Subscription'.
    Property '_parentOrParents' is protected but type 'Subscription' is not a class derived from 'Subscription'.

  30. Splaktar commented on May 14, 2019

    @Splaktar
    Contributor

    @adhivenkatesh please open a new issue with a reproduction.

  31. added a commit that references this issue on Jun 15, 2019
  32. added a commit that references this issue on Jun 26, 2019
  33. Riccardo-Andreatta commented on Jul 2, 2019

    @Riccardo-Andreatta

    I am getting the same error when I am upgrading from version 5 to version 6 but running ng update @angular/core --next --force is forcing update to the latest release: is there a workaround to update just to the version I want?

  34. Splaktar commented on Jul 2, 2019

    @Splaktar
    Contributor

    @Riccardo-Andreatta ng update @angular/core --migrate-only --from=5 --to=6 --force. See more details in ng update --help or https://angular.io/cli/update.

  35. cjonasw commented on Jul 3, 2019

    @cjonasw

    I didn't want to use --force as it installs unstable packages and also... we shouldn't have to.

    I found a solution to the above that worked for me. I installed the latest codelyzer

    npm install codelyzer@latest --save-dev

    then ran the ng update @whatever I needed to do and it worked with no complaints.

  36. adhivenkatesh commented on Jul 5, 2019

    @adhivenkatesh
  37. ahmar-appify commented on Aug 6, 2019

    @ahmar-appify

    Reinstalling cli worked for me as it installed latest.
    npm uninstall @angular/cli
    npm install @angular/cli

    after this all ng update worked

  38. Ferie commented on Aug 12, 2019

    @Ferie

    @Splaktar I have tried the --from and --to options but they are not working: still they are upgrading directly to the last version available.

    I had to install the specific version (ng update @angular/core@6.1.0) both for core and cli, and then update manually the package.json to update every single module that my application needs (http, common, forms, etc).

  39. clydin commented on Aug 12, 2019

    @clydin
    Member

    The --from and --to options will only affect the --migrate-only option. CLI versions 8.0+ will now error if the options are used incorrectly.

  40. angular-automatic-lock-bot commented on Sep 14, 2019

    @angular-automatic-lock-bot

    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.

  41. locked and limited conversation to collaborators on Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions