Is it possible that @ngrx5.2.0 and @angular4.4.3 are not compatible? My scenario is the following: I just installed in my angular4.4.3 project ngrx in order to manage my state management. I practice a bit with the angular5.2.0 official boilerplate to have a bit of strcuture in my way of coding and all works. I implemented in this production project the same way I did it in my test and this is the error I've during in compilation:
ERROR in Error: Metadata version mismatch for module /opt/webapp/node_modules/@ngrx/store/store.d.ts, found version 4, expected 3, resolving symbol AppModule in /......./app.module.ts, resolving symbol AppModule in /............./app.module.ts, resolving symbol AppModule in /........../app.module.ts
The weird thing in this error is that the mentioned versions are 4 and 3, meanwhile -I guess- they should be 5 and 4 - if the versioning is referred to angular and the store, or to the store only.
Any idea?
Once these libraries are updated, the error disappears:
"@angular/animations": "^5.2.0",
"@angular/cli": "^1.7.4",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/compiler-cli": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/platform-server": "^5.2.0",
"@angular/router": "^5.2.0",
"ngx-webstorage": "^2.0.1",
"ts-node": "^4.1.0",
"typescript": "2.5.3"
So indeed, it is a matter of compatibility.