nx: All usages of DataPersistence are broken after upgrading to version 8
Please make sure you have read the submission guidelines before posting an issue
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [x ] I am running the latest version
- [ x] I checked the documentation and found no answer
- [x ] I checked to make sure that this issue has not already been filed
- [ x] I’m reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)
Expected Behavior
DataPersistence functions should run as before
Current Behavior
A giant confusing error is thrown (just took as much of screen shot as possible. I have about 100 usages and they are all in error).

Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue. Here is an example though there are many flavors
loadWidgetData = this.dataPersistence.fetch(LOAD_WIDGETS_FOR_DASHBOARD, {
run: (action: LoadWidgetsForDashboard, state: WidgetsState) => {
return action.payload
? this.service.fetchWidgetsWithLayout(action.payload).pipe(
map(result => ({
type: DASHBOARD_WIDGETS_LOADED,
payload: {
messages: result.widgets,
layoutConfig: result.layoutConfig,
layout: result.layout,
parentDashboardId: action.payload
}
}))
)
: null;
},
onError: (action: LoadWidgetsForDashboard, error) => {
console.error('Error', error);
}
});
Context
Please provide any relevant information about your setup:
I just ran ng update.
I know that error screen shot may not be very helpful but I did not see anything in migrations that would give me a hint as to what has changed. Was anything changed that would cause this issue? It broke for every single usage.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 32 (8 by maintainers)
Version conflict of rxjs
Nx useses version 6.4.0 but the default is 6.5.2
@FillScheers @jasedwards thanks that fixed my problem during the build, but now I get the following error during run time:
NgRx 8.0.1 has been released 🚀
@vsavkin I was able to get it to work completely once NgRx 8.0.1 came out. I just have rxjs hard coded to 6.4. Is there an issue I can follow in nx to know when 6.4 will no longer be necessary?
Fyi, the NgRx team has made some changes that allows us to use RxJS v6.4 We’ll probably cut a release soon, which should solve these issues 🙂 I’ll drop a message where when we’ve released NgRx v8.0.1
I can repro this with “@ngrx/effects”: “8.5.0”, “@ngrx/entity”: “8.5.0”, “@ngrx/router-store”: “8.5.0”, “@ngrx/store”: “8.5.0”, “@nrwl/angular”: “8.7.1”, “@nrwl/workspace”: “8.7.1”, “@schematics/angular”: “0.8.3”, “rxjs”: “6.4.0”,
@neilhem NgRx v8 requires RxJS v6.5
https://ngrx.io/guide/migration/v8#dependencies