8

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 ?

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
Tom
  • 8,175
  • 41
  • 136
  • 267
  • 1
    The library currently installed during the upgrade is @angular/core 7.0 . Does that mean I need to down grade – Tom Oct 25 '18 at 07:18

2 Answers2

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/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.

HDJEMAI
  • 9,436
  • 46
  • 67
  • 93
  • The library currently installed during the upgrade is @angular/core 7.0 . Does that mean I need to down grade – Tom Oct 25 '18 at 07:18
  • Do I need to downgrade the angular/core version to use ngrx. Doesn’t make sense right – Tom Oct 25 '18 at 17:33
  • if you need to use `ngrx/store@6.1.0`, then you have to install the required angular core. uninstall your current angular core lib and then install `@angular/core@6.0.0` – HDJEMAI Oct 26 '18 at 02:12
  • If I install @angular/core@6.0.0 then other packages are affected. Then what’s the use of downgrading all the packages . The basic idea is to upgrade to the latest – Tom Nov 03 '18 at 17:31
  • [How do I deal with installing peer dependencies in Angular CLI?](https://stackoverflow.com/questions/48626005/how-do-i-deal-with-installing-peer-dependencies-in-angular-cli/48627003) – HDJEMAI Nov 10 '18 at 00:18
1

You should be able to solve with the following command,

 ng update @ngrx/store --next --force
Sajeetharan
  • 216,225
  • 63
  • 350
  • 396