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 upgrade: incompatible peer dependency error prevents from auto-updating #10875

Closed
juristr opened this issue May 15, 2018 · 46 comments
Closed

Comments

@juristr
Copy link
Contributor

juristr commented May 15, 2018

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)

@juristr
Copy link
Contributor Author

juristr commented May 15, 2018

@clydin Hi, I was chatting about this in the Angular Slack with @filipesilva and he told me to open the issue here. Let me know if you need more info. Thanks a lot 👍

@brandonroberts
Copy link
Contributor

brandonroberts commented May 16, 2018

I'm running into a similar issue when trying to update NgRx.

If I have all the @ngrx libraries installed and I run ng update @ngrx/store --next I get

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

If I run yarn list @angular-devkit/core, I see

@angular-devkit/core@0.6.1

@intellix
Copy link
Contributor

intellix commented May 19, 2018

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?

@Teamop
Copy link
Contributor

Teamop commented May 21, 2018

I have the same issue, but instead run ng update @angular/compiler-cli successfully without error.

@filipesilva filipesilva added the needs: discussion On the agenda for team meeting to determine next steps label May 21, 2018
@getabetterpic
Copy link

I'm running into this issue as well, seems the updater is trying to install typescript@2.8.3 but @angular/compiler-cli has a peer dependency of typescript@">=2.7.2 <2.8".

@sachinpachori
Copy link

When I ran "ng update @angular/core" got the following errors and cannot upgrade to angular 6:
Package "angular2-resizable" has an incompatible peer dependency to "@angular/core" (requires ">=3.0.0-rc.0 <4.0.0||>=2.0.0 <3.0.0", would install "6.0.2").
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.2").

@brandonroberts
Copy link
Contributor

Just so its noted, the workaround is to use the --force flag when running ng update [package] to override the dependency issues. This will upgrade the packages anyway and you can verify your app with the updated dependencies. If that third party dependency still needs to be updated because of breaking changes, then that package will need to be updated.

ng update @ngrx/store --next --force

@clydin
Copy link
Member

clydin commented May 22, 2018

@sachinpachori Those are actually legitimate errors. The project has a dependency (angular2-resizable) that does not support Angular 6. As @brandonroberts mentions, the --force flag can be used (with caution) to update while ignoring those issues.
And similar with codelyzer; however, since codelyzer is part of the default project this could potentially (and in the future) be automatically updated (depending on the pinning strategy) with a CLI update.

@sachinpachori
Copy link

@brandonroberts @clydin thank you that solved my issue.

@devssharma
Copy link

devssharma commented Jun 3, 2018

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 !!!

@HarryWang74
Copy link

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

@Sharondio
Copy link

Sharondio commented Jun 13, 2018

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?

@clydin
Copy link
Member

clydin commented Jun 13, 2018

@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.

@Sharondio
Copy link

@clydin They are installed globally. Still getting error.

@clydin
Copy link
Member

clydin commented Jun 13, 2018

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.

@matheo
Copy link

matheo commented Jul 27, 2018

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!

@Newbie012
Copy link

Newbie012 commented Aug 2, 2018

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

@prasanthlouis
Copy link

prasanthlouis commented Aug 31, 2018

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.

@demonguru18
Copy link

ng update @angular/cli this will do the trick

@odahcam
Copy link

odahcam commented Oct 30, 2018

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

@demonguru18
Copy link

demonguru18 commented Oct 30, 2018

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

@stephanie-dm
Copy link

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

@arulsuju
Copy link

arulsuju commented Jan 8, 2019

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

@demonguru18
Copy link

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"

      ]
    }
  ]
}

@hansl hansl removed needs: discussion On the agenda for team meeting to determine next steps labels Jan 24, 2019
@sanjaytarani0
Copy link

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"})

@codemcu
Copy link

codemcu commented Feb 9, 2019

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

@briancodes
Copy link

briancodes commented May 5, 2019

@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

@adhivenkatesh
Copy link

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

@Splaktar
Copy link
Member

@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.

@adhivenkatesh
Copy link

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

@adhivenkatesh
Copy link

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'.

@Splaktar
Copy link
Member

@adhivenkatesh please open a new issue with a reproduction.

xxyyzz2050 added a commit to xxyyzz2050/eldeebCMS-2019.6.21 that referenced this issue Jun 15, 2019
> ng update @angular/cli @angular/core  @angular/material --next --force
  - --force: force update peerDependencies
  - share anonymous usage data: no

- https://update.angular.io/#7.2:8.0
- 
angular/angular-cli#10875 (comment)
xxyyzz2050 added a commit to xxyyzz2050/eldeebCMS-2019.6.21 that referenced this issue Jun 26, 2019
> ng update @angular/cli @angular/core  @angular/material --next --force
  - --force: force update peerDependencies
  - share anonymous usage data: no

- https://update.angular.io/#7.2:8.0
- 
angular/angular-cli#10875 (comment)
@Riccardo-Andreatta
Copy link

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?

@Splaktar
Copy link
Member

Splaktar commented Jul 2, 2019

@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.

@cjonasw
Copy link

cjonasw commented Jul 3, 2019

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.

@adhivenkatesh
Copy link

adhivenkatesh commented Jul 5, 2019 via email

@ahmar-appify
Copy link

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

after this all ng update worked

@Ferie
Copy link

Ferie commented Aug 12, 2019

@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).

@clydin
Copy link
Member

clydin commented Aug 12, 2019

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.

@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 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests