[ x ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
When upgrading to ngrx/store 5.2 with ng update my typescript code is throwing an error:
[ts] Property 'pipe' does not exist on type 'Store<any[]>'.
@Injectable()
export class ManagerService {
groups: Group;
constructor(private store: Store<Group[]>) {
// No error here
this.store.dispatch(new managerStore.addAll(this.group));
}
...
getAllGroups(): Observable<Group[]> {
// Error here
return this.store.pipe(
select('lances'),
);
}
}
Available properties:

For the .pipe method to be available
Run ng update on a angular CLI project
Run the ng update @angular/cli command
node 10
npm 6
Linux Mint 18
"dependencies": {
"@angular/animations": "6.0.0",
"@angular/common": "6.0.0",
"@angular/compiler": "6.0.0",
"@angular/core": "6.0.0",
"@angular/forms": "6.0.0",
"@angular/http": "6.0.0",
"@angular/platform-browser": "6.0.0",
"@angular/platform-browser-dynamic": "6.0.0",
"@angular/router": "6.0.0",
"@ng-bootstrap/ng-bootstrap": "^1.1.2",
"@ngrx/effects": "^5.2.0",
"@ngrx/entity": "^5.2.0",
"@ngrx/store": "^5.2.0",
"@ngrx/store-devtools": "^5.2.0",
"angular-tree-component": "^7.1.0",
"bootstrap": "^4.1.1",
"core-js": "^2.5.5",
"ng-drag-drop": "^4.0.1",
"ngrx-store-freeze": "^0.2.2",
"ngx-store": "^1.4.1",
"rxjs": "^6.1.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/cli": "6.0.0",
"@angular/compiler-cli": "6.0.0",
"@angular/language-service": "6.0.0",
"@types/jasmine": "~2.8.7",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.0.3",
"codelyzer": "^4.3.0",
"jasmine-core": "~3.1.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~2.0.2",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.2",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^1.0.0",
"protractor": "~5.3.1",
"ts-node": "~6.0.2",
"tslint": "~5.10.0",
"typescript": "2.8.3",
"@angular-devkit/build-angular": "~0.6.0"
}
@ngrx has not yet been moved to support [email protected] as of yet.
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/core@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "rxjs@^5.5.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/core@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "rxjs@^5.5.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "rxjs@^5.5.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/common@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/core@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/router@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "rxjs@^5.5.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "@angular/core@^5.0.0".
warning " > @ngrx/[email protected]" has incorrect peer dependency "rxjs@^5.5.0".
So for now you might need to use angular 5.* with rxjs 5.* until rxjs 6 has been implemented with it's new imports
@joelmuskwe Hmm, ok - so I suppose everyone's ng update will break then...
https://github.com/ngrx/platform/commit/d1286d221ec958a08b306ae85bf9d68ea267a40d#diff-089e1452c65c848d5e1e661400081f11 suggests that this release should support 6 though
currently i am try to follow https://github.com/ReactiveX/rxjs/blob/master/MIGRATION.md
On Backwards compatibility will give feedback once i have finished
@tanepiper The latest version available on npm is 5.2.0, there is no support for rxjs 6 yet. The commit you refer to is part of a beta ngrx 6.0 release - so while not available yet, it should be soon.
Ahh so pretty much the advice is "Angular 6 is out, but if you're using ngrx/store don't upgrade"?
@tanepiper you can upgrade, but then you also have to install rxjs-compat. This will form a bridge between the old and new rxjs syntax - meaning that the pipe operable should exist on store.
EDIT: you can also install the beta version of ngrx via npm install @ngrx/[email protected]
@tdeschryver And there is it at the top of the readme.... :man_facepalming:
I'm seeing .pipe used within the docs but if it doesn't work without a library should that be mentioned somewhere (I missed it if it was). Would a PR for this be accepted? Or, would anybody be wasting there time as the "fix" is already in the beta version.
I'm really confused as why the docs use .pipe, even in tagged versions like 5.2, when this will not work.
@adam-beck With the release of NgRx 6 yesterday this should be resolved.
Most helpful comment
@tanepiper you can upgrade, but then you also have to install
rxjs-compat. This will form a bridge between the old and new rxjs syntax - meaning that thepipeoperable should exist onstore.EDIT: you can also install the beta version of ngrx via
npm install @ngrx/[email protected]