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)
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 !!!
Reacted by Sanjeev Kumar Sharma, Jon Ludwig, GaryLiu01, Robbie Clarken, Joshua Hendinata, sujit22993, Caleb Viola, Alfa P. Irawan, Edward J Beckett, Ismael Ramos and 19 more
Reacted by GaryLiu01, Robbie Clarken, Alfa P. Irawan, Ismael Ramos, Murilo Eduardo dos Santos and Nate C.
Reacted by GaryLiu01, Robbie Clarken, Alfa P. Irawan, Murilo Eduardo dos Santos, Guido Dizioli and Eloy Adonis Colell
Reacted by GaryLiu01, Pablo José, Robbie Clarken, Alfa P. Irawan, Alpesh Vasani, Murilo Eduardo dos Santos, Daniel Flórez, Vishnudev Krishnadas and Carl Röber
ng update @angular/core --next --force works for me
Reacted by Murilo Eduardo dos Santos, Evan Gillogley, Eloy Adonis Colell, Jordan Jesse, Shiva Kumar Avula, Nate C., Hasan Erzi, Patrik Alexits, Michael Czechowski, Giorgio Crivellari and 1 more
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?
@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.
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.
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".
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)
Happening on update to Angular 7 and TypeScript 3.1 too.
Reacted by Julian, Jake Ruesink, Vijay Singh, Eduard Kolosovskyi, miteshngandhi, Thanh Nguyen, Mark Phillips, Ross Rasmussen, ChuangPoPO, Ross Bender and 2 more
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
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?
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
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"})
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
Reacted by Murali Srinivasan, Ikechukwu Okafor, Vinicius Silva, Siddi Vinayaka, Brian B and Daniel Delgado
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
fix(@schematics/update): stabilize package list before continuing
devssharma commentedon 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 commentedon Jun 4, 2018
ng update @angular/core --next --force works for me
fix(@schematics/update): stabilize package list before continuing
fix(@schematics/update): stabilize package list before continuing
fix(@schematics/update): stabilize package list before continuing
Sharondio commentedon Jun 13, 2018
I'm doing a fresh install of my npm modules, and running into this issue:
But angular-devkit/schematics@0.6.8 is installed. Is using --force still the recommended workaround?
clydin commentedon Jun 13, 2018
@Sharondio You're installing
@ngrx/schematics@latestglobally. If that is intentional then the peer dependencies of the package would also need to be installed globally.Sharondio commentedon Jun 13, 2018
@clydin They are installed globally. Still getting error.
clydin commentedon Jun 13, 2018
If
npm ls -g --depth=0doesn't show the warnings then everything should be fine.Please note that this is actually an
npmissue (and possible a defect) and not a CLI issue.matheo commentedon Jul 27, 2018
So I figured out that
ng update --alldoesn't work as expected,so you better upgrade everything in order:
Note that I had to update some dependencies because
@angular/coreinstallstypescript 2.9.2and the version I had oftsickledidn't supported it:and also
@ngrx/storehad a missing dependency:Thanks for the great work!
Newbie012 commentedon Aug 2, 2018
I just ran
and the output was (ok):
prasanthlouis commentedon 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.
asmaa3107 commentedon Sep 2, 2018
it gave me a successful serve but in browser I got this error
leonardox12 commentedon Sep 4, 2018
ng update @angular/cli@version --force it worked for me
sameersayani commentedon Sep 8, 2018
ng update --all --force this worked for me.
odahcam commentedon Oct 19, 2018
Happening on update to Angular 7 and TypeScript 3.1 too.
sameersayani commentedon Oct 19, 2018
odahcam commentedon Oct 19, 2018
The update with
--forcedoes work, but some packages likeng-packagrbreaks due totsickleversion.demonguru18 commentedon Oct 30, 2018
ng update @angular/cli this will do the trick
odahcam commentedon Oct 30, 2018
At this time, just the update as @demonguru18 said should work.
demonguru18 commentedon 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,
cs-StephanieDM commentedon Dec 3, 2018
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 commentedon Jan 8, 2019
try
demonguru18 commentedon Jan 8, 2019
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
sanjaytarani0 commentedon Feb 5, 2019
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 commentedon 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 commentedon May 5, 2019
@codemcu The
--nextflag is probably not what people are expecting. From the Angular docsadhivenkatesh commentedon May 12, 2019
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 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.