[X] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
When compiling some projects with #153 and AOT, we get the following error:
ERROR in /home/vnoel/Linagora/Petals/dev/git/petals-cockpit/frontend/src/$$_gendir/node_modules/@ngrx/store/store.ngfactory.ts (51,65): Argument of type '{}' is not assignable to parameter of type 'StoreFeature<any, any>[]'.
Property 'includes' is missing in type '{}'.
It should compile fine :)
I couldn't reproduce it on a small repro, but my application is publicly available.
Clone https://gitlab.com/linagora/petals-cockpit.git, checkout 201e583230d81cd32821a32c67ffdccd1521d524, run yarn once, yarn run build
node 8, ngrx nightly (7f77693, the one with #153), angular 4.1.3 and angular-cli 1.3.0-rc.0.
I too am having the same error with AOT compiling.
Versions affected:
I swapped to Node v8.2.1 and upgraded Typescript both locally and globally to v2.4.2 and the error has gone away.
upgrading node didn't work for me, but downgrading @ngrx/store to v4.0.0 did.
I'm running into this as well however can't downgrade to v4.0.0 because of #189. @brandonroberts any guidance on this?
@victornoel got it working by upgrading Angular to 4.3.x
Hi there. Just to mention we too are experiencing this error when trying to switch to AOT:
ERROR in d:/ProjectRoot/src/node_modules/@ngrx/store/store.ngfactory.ts (51,65): Argument of type '{}' is not assignable to parameter of type 'StoreFeature
[]'.
Property 'length' is missing in type '{}'.
ERROR in Error encountered resolving symbol values statically. Calling function 'TabsModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in d:/ProjectRoot/src/app/module.ts, resolving symbol AppModule in d:/ProjectRoot/src/app/module.ts
(maybe the second one is a separate thing, related to ngx-bootstrap, but those were the only errors, so posting it just in case).
I have no simple repro project to show, this is from the project we're working at. Environment:
Just to specify that in the past we were not able to make AOT work with ngrx 2.x: there was an issue here here never "fixed" and now closed after the v 4.x came out.
Nope I don't think I did make it work...
For the record, I suspect the problem is caused by the fact ngrx is
compiled with ts 2.4 and the problems appear with lesser version of ts.
Le 11 août 2017 5:49 PM, "Matt Oliver" notifications@github.com a écrit :
@victornoel https://github.com/victornoel got it working by upgrading
Angular to 2.4.x—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ngrx/platform/issues/191#issuecomment-321849391, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAJ0z3GoSzwjJYavTQ1hZFv1N8KfTZp7ks5sXHgEgaJpZM4OjrRg
.
Just in case it helps others, I got it working with:
I got a simple repro project about this, BrainCrumbz/ngtools-webpack-demo/, where there's an empty state and a no-op reducer. All it really does related to ngrx is invoking StoreModule.forRoot(...).
As tracked in this issue, build error went away after upgrading angular (and zone.js).
I'm gonna close this issue as resolved with the latest packages mentioned above. If it can be reproduced with those packages a new issue can be opened.
Most helpful comment
Just in case it helps others, I got it working with: