ngrx/store@6.1.0 requires a peer of @angular/core@^6.0.0 while upgrading to angular 7

Viewed 3621

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

npm WARN @ngrx/effects@6.1.0 requires a peer of @angular/core@^6.0.0 but none is installed.
You must install peer dependencies yourself.
npm WARN @ngrx/store@6.1.0 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 ?

2 Answers

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/store@6.1.2

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.

You should be able to solve with the following command,

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