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 ?
NgRx is a popular solution in the Angular ecosystem if you are building complex web applications with sophisticated state management. Characteristics of the need for NgRx are many user interactions and multiple data sources. NgRx is a good choice, if: the state should be accessed by many components and services.
Where Does NgRx Store Data? NgRx stores the application state in an RxJS observable inside an Angular service called Store. At the same time, this service implements the Observable interface.
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.
You should be able to solve with the following command,
ng update @ngrx/store --next --force
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With