You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng upgrade: incompatible peer dependency error prevents from auto-updating #10875
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)
@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 👍
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?
Reacted by Fernando Monteiro, Toby Thain, MikeCIDFG and manjitsingh91
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".
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").
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
Reacted by D, SP, Jonathan Turkington, Matt, Stephan Muller, Jose, Maden-maxi, anvw, jayanth528, Joshua Hendinata and 92 more
Reacted by Alex Karpov, Clément Roblot, Tsholofelo Pole, Tanja, Nicolae Olariu, Andrey, Ivan and Islander
Reacted by Alex Karpov, Semen Shestakov, Stanisław Wasiutyński, Clément Roblot, Tanja, Nicolae Olariu, Vugar, Venkat Muthu, Fahad Shah and Benjamin B
Reacted by Alex Karpov, Aziz Haddad, Luis E. Jiménez, Clément Roblot, Tanja and Nicolae Olariu
Reacted by Alex Karpov, Fernanda Stefani, Clément Roblot, Tanja and Kim Dahlberg
@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.
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'.
Reacted by Zingg, Nate, Creative-House.org and Tucker Gordon
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?
On Wed, Jul 3, 2019 at 10:38 PM Charlie Walter ***@***.***> wrote:
I didn't want to use --force as it installs betas and also one shouldn't
have to.
I found a solution to the above that worked for me. I installed the latest
codelyzer
npm install ***@***.***
then ran the ng update @whatever I needed to do and it worked with no
complaints.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10875?email_source=notifications&email_token=AG5YZMSI2J2LCKZXQHPFAPDP5US5HA5CNFSM4FABH5TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZF3GNI#issuecomment-508277557>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG5YZMW67XWJJ2HEUP42XCTP5US5HANCNFSM4FABH5TA>
.
@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).
Activity
juristr commentedon 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 commentedon May 16, 2018
I'm running into a similar issue when trying to update NgRx.
If I have all the
@ngrxlibraries installed and I runng update @ngrx/store --nextI getIf I run
yarn list @angular-devkit/core, I seeintellix commentedon May 19, 2018
Not sure if it's the same thing, but I'm getting errors like:
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 commentedon May 21, 2018
I have the same issue, but instead run
ng update @angular/compiler-clisuccessfully without error.getabetterpic commentedon May 22, 2018
I'm running into this issue as well, seems the updater is trying to install
typescript@2.8.3but@angular/compiler-clihas a peer dependency oftypescript@">=2.7.2 <2.8".sachinpachori commentedon May 22, 2018
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 commentedon May 22, 2018
Just so its noted, the workaround is to use the
--forceflag when runningng 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.clydin commentedon 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--forceflag can be used (with caution) to update while ignoring those issues.And similar with
codelyzer; however, sincecodelyzeris 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 commentedon May 23, 2018
@brandonroberts @clydin thank you that solved my issue.
fix(@schematics/update): stabilize package list before continuing
32 remaining items
Splaktar commentedon May 14, 2019
@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 commentedon May 14, 2019
Yes , splaktar, good day, thanks for your revert, i will go through the angular bootstrapping guide, thank you.
adhivenkatesh commentedon May 14, 2019
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 commentedon May 14, 2019
@adhivenkatesh please open a new issue with a reproduction.
upgrade to Angular 8
upgrade to Angular 8
Riccardo-Andreatta commentedon Jul 2, 2019
I am getting the same error when I am upgrading from version 5 to version 6 but running
ng update @angular/core --next --forceis forcing update to the latest release: is there a workaround to update just to the version I want?Splaktar commentedon Jul 2, 2019
@Riccardo-Andreatta
ng update @angular/core --migrate-only --from=5 --to=6 --force. See more details inng update --helpor https://angular.io/cli/update.cjonasw commentedon Jul 3, 2019
I didn't want to use
--forceas 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-devthen ran the
ng update @whatever I needed to do and it worked with no complaints.adhivenkatesh commentedon Jul 5, 2019
ahmar-appify commentedon Aug 6, 2019
Reinstalling cli worked for me as it installed latest.
npm uninstall @angular/cli
npm install @angular/cli
after this all ng update worked
Ferie commentedon Aug 12, 2019
@Splaktar I have tried the
--fromand--tooptions 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 thepackage.jsonto update every single module that my application needs (http,common,forms, etc).clydin commentedon Aug 12, 2019
The
--fromand--tooptions will only affect the--migrate-onlyoption. CLI versions 8.0+ will now error if the options are used incorrectly.angular-automatic-lock-bot commentedon Sep 14, 2019
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.