ngrx/[email protected] requires a peer of @angular/core@^6.0.0 while upgrading to angular 7
Asked Answered
I

2

8

I tried to migrate Angular 6 application to angular 7 application and have got the following warning messsage

npm WARN @ngrx/[email protected] requires a peer of @angular/core@^6.0.0 but none is installed.
You must install peer dependencies yourself.
npm WARN @ngrx/[email protected] requires a peer of @angular/core@^6.0.0 but none is installed.
You must install peer dependencies yourself.

What does that mean ?

Does it mean that there is no compatible store for angular 7 ?

Will my store not work ?

Irrelevant answered 24/10, 2018 at 22:20 Comment(1)
The library currently installed during the upgrade is @angular/core 7.0 . Does that mean I need to down gradeIrrelevant
S
7

Update:

NgRx is updated to 6.1.2 to resolve bugs and for compatibility with angular 7.

So according to https://github.com/ngrx/platform/issues/1397, you can ignore the peer dependencies and it should work with angular 7.

install:

npm install @ngrx/[email protected]

If you want to get rid of these warning you can go with @ngrx/store@7 by installing the Nightly builds this way:

npm install github:ngrx/store-builds

You are required then to have git installed in your system.

But keep in mind that @ngrx/store@7 still a beta release.

In the above given link, the reason why they apgraded to NgRx 6.1.2 is that the @ngrx/router-store has a bug with angular 7.

So upgrading to NgRx 6.1.2 make it usable and compatible with angular 7 and you can ignore the peer dependencies.

Septemberseptembrist answered 24/10, 2018 at 23:45 Comment(5)
The library currently installed during the upgrade is @angular/core 7.0 . Does that mean I need to down gradeIrrelevant
Do I need to downgrade the angular/core version to use ngrx. Doesn’t make sense rightIrrelevant
if you need to use ngrx/[email protected], then you have to install the required angular core. uninstall your current angular core lib and then install @angular/[email protected]Septemberseptembrist
If I install @angular/[email protected] then other packages are affected. Then what’s the use of downgrading all the packages . The basic idea is to upgrade to the latestIrrelevant
How do I deal with installing peer dependencies in Angular CLI?Septemberseptembrist
L
1

You should be able to solve with the following command,

 ng update @ngrx/store --next --force
Loom answered 4/11, 2018 at 4:57 Comment(2)
I tried this. I still get the same warning.@ngrx/[email protected] requires a peer of @angular/core@^6.0.0 but none is installedIrrelevant
use npm install @ngrx/[email protected]Loom

© 2022 - 2024 — McMap. All rights reserved.