ngrx / platform

Reactive State for Angular
https://ngrx.io
Other
8.04k stars 1.98k forks source link

Hi Ngrx team, i am using angular-4 and @ngrx/store": "^4.1.0 -> During AOT build I am receiving below error - "ERROR in C:/AOT/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 '{}'." #535

Closed sachindave1978 closed 7 years ago

sachindave1978 commented 7 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request

What is the current behavior?

Expected behavior:

Minimal reproduction of the problem with instructions:

Version of affected browser(s),operating system(s), npm, node and ngrx:

Other information:

sachindave1978 commented 7 years ago

ERROR in C:/AOT/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 '{}'.

brandonroberts commented 7 years ago

You need to update your version of Angular. This was a compiler bug

sachindave1978 commented 7 years ago

Hello Brandon, we have already latest Angular4 below is the package.json are you recommending to go for 5.0.0-rc.8 ?

"dependencies": { angular/animations: "4.1.3", angular/common: "4.1.3", angular/compiler: "4.1.3", angular/core: "4.1.3", angular/forms: "4.1.3", angular/http: "4.1.3", angular/platform-browser: "4.1.3", angular/platform-browser-dynamic: "4.1.3", angular/platform-server: "4.1.3", angular/router: "4.1.3", "@ng-bootstrap/ng-bootstrap": "1.0.0-alpha.26", "@ngrx/core": "^1.2.0", "@ngrx/router-store": "^4.0.4", "@ngrx/store": "^4.0.3", "@ngrx/store-devtools": "^4.0.0", "@ngx-translate/core": "6.0.1", "@ngx-translate/http-loader": "0.0.3", "amcharts3": "github:amcharts/amcharts3", "ammap3": "github:amcharts/ammap3", "angular2-datatable": "0.6.0", "animate.css": "3.5.2", "bootstrap": "4.0.0-alpha.6", "chart.js": "1.1.1", "chartist": "0.10.1", "chroma-js": "1.3.3", "ckeditor": "4.6.2", "core-js": "2.4.1", "dragula": "^3.7.2", "easy-pie-chart": "2.1.7", "font-awesome": "4.7.0", "fullcalendar": "3.3.1", "google-maps": "3.2.1", "ionicons": "2.0.1", "jquery": "3.2.1", "jquery-slimscroll": "1.3.8", "leaflet": "0.7.7", "leaflet-map": "0.2.1", "lodash": "4.17.4", "mydatepicker": "^2.0.31", "mydaterangepicker": "^4.1.11", "ng2-ckeditor": "1.1.6", "ng2-completer": "1.3.1", "ng2-date-picker": "^2.1.1", "ng2-dragula": "^1.5.0", "ng2-handsontable": "0.48.0", "ng2-select": "^1.2.0", "ng2-slim-loading-bar": "4.0.0", "ng2-smart-table": "1.0.3", "ng2-tabs": "0.0.11", "ng2-tree": "2.0.0-alpha.5", "ngrx-store-freeze": "^0.1.9", "ngx-uploader": "2.2.5", "normalize.css": "6.0.0", "roboto-fontface": "0.7.0", "rxjs": "5.4.0", "table-dragger": "^1.0.1", "zone.js": "0.8.11" }

krjordan commented 7 years ago

According to the code you posted, you aren't on the latest version of Angular. The latest is4.5.x I believe and you have locked your versions to4.1.3. you should either update it manually or you can add the^ to update to the latest minor version.

Also, you should remove @ngrx/core as it's no longer needed with ngrx version 4.

sachindave1978 commented 7 years ago

Hi Jordan, we have upgrade solution to angular4.4.6 & getting build error now for --prod too..

ERROR in this.compiler.compileAll is not a function ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Code\Shield.Web\src'