Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxJs mismatch issues in DataPersistance keep coming back #2421

Closed
evtk opened this issue Feb 3, 2020 · 4 comments
Closed

RxJs mismatch issues in DataPersistance keep coming back #2421

evtk opened this issue Feb 3, 2020 · 4 comments
Assignees
Labels

Comments

@evtk
Copy link

evtk commented Feb 3, 2020

Expected Behavior

I can run an upgrade of NX with npm run update, without getting issues with dataPersistance.

Current Behavior

I have spent a lot of time to get the issues I had with RxJS version mismatch solved. See this topic: #1416 (comment).

Now it has been a while since I had the time to upgrade NX. So coming from "@nrwl/angular": "8.6.0" I am updating to "@nrwl/angular": "8.12.1". But as soon this upgrade is done, I get the same RxJS related errors.

Failure Information (for bugs)

My RxJS version is pinned to 6.5.3. After running the update I get these types of errors:

Type 'Observable<MyAction>' is not assignable to type 'void | Action | Observable<Action>'. Type 'Observable<MyAction>' is not assignable to type 'Observable<Action>'. Types of property 'source' are incompatible. Type 'import("/Users/evtk/Documents/git/my.repo/client/angular/node_modules/rxjs/internal/Observable").Observable<any>' is not assignable to type 'import("/Users/evtk/Documents/git/my.repo/client/angular/node_modules/@nrwl/angular/node_modules/rxjs/internal/Observable").Observable<any>'.

So then I decided to downgrade to the 6.4.0 version of RxJS. This is unwanted, because I have another package explicitly asking for 6.5.3, but just to make sure. After downgrading to RxJS 6.4.0 I have checked my package-lock file and it doesn't contain any references to RxJS 6.5.3. anymore. Now I can build my app, but as soon as I serve it, I get these type of errors again:

... dispatched an invalid action: {"_isScalar":false,"source"

Steps to Reproduce

I can't share my repo because it contains corporate code, but here is my package.json after just running the npm update. I feel that there should be no need to downgrade RxJS.

"dependencies": {
    "@angular/animations": "8.2.8",
    "@angular/cdk": "8.2.0",
    "@angular/common": "8.2.8",
    "@angular/compiler": "8.2.8",
    "@angular/core": "8.2.8",
    "@angular/forms": "8.2.8",
    "@angular/platform-browser": "8.2.8",
    "@angular/platform-browser-dynamic": "8.2.8",
    "@angular/router": "8.2.8",
    "@ngrx/effects": "8.4.0",
    "@ngrx/entity": "8.4.0",
    "@ngrx/router-store": "8.4.0",
    "@ngrx/store": "8.4.0",
    "@nrwl/angular": "8.12.1",
    "@sitecore-jss/sitecore-jss": "13.0.0",
    "@sitecore-jss/sitecore-jss-angular": "13.0.0",
    "core-js": "2.5.4",
    "ibantools": "2.0.0",
    "luxon": "1.19.3",
    "merge": "1.2.1",
    "pikaday": "1.8.0",
    "rxjs": "6.5.3",
    "zone.js": "0.9.1"
  },
"devDependencies": {
    "@angular-devkit/build-angular": "0.803.3",
    "@angular/cli": "8.3.3",
    "@angular/compiler-cli": "8.2.8",
    "@angular/language-service": "8.2.8",
    "@ngrx/schematics": "8.4.0",
    "@ngrx/store-devtools": "8.4.0",
    "@nrwl/cypress": "8.12.1",
    "@nrwl/jest": "8.12.1",
    "@nrwl/workspace": "8.12.1",
    "@sitecore-jss/sitecore-jss-dev-tools": "13.0.0",
    "@types/jest": "24.0.9",
    "@types/luxon": "1.15.2",
    "@types/node": "8.9.4",
    "codelyzer": "5.0.1",
    "cypress": "3.8.2",
    "dotenv": "6.2.0",
    "eslint": "6.1.0",
    "istanbul": "0.4.5",
    "jest": "24.9.0",
    "jest-junit": "8.0.0",
    "jest-preset-angular": "7.0.0",
    "ng-mocks": "8.0.0",
    "npm-run-all": "4.1.5",
    "prettier": "1.19.1",
    "ts-jest": "24.0.0",
    "ts-node": "7.0.1",
    "tslint": "5.11.0",
    "tslint-defocus": "2.0.6",
    "typescript": "3.5.3",
    "vsts-coverage-styles": "^1.0.8"
  }
@andreaswilli
Copy link

I experience the exact same issue (@nrwl/angular version 8.12.2):
After downgrading rxjs to 6.4.0 I get this:

... dispatched an invalid action: {"_isScalar":false,"source"

@vsavkin vsavkin self-assigned this Feb 5, 2020
@vsavkin vsavkin added scope: core core nx functionality type: bug labels Feb 5, 2020
@vsavkin
Copy link
Member

vsavkin commented Feb 9, 2020

It's a common problem with having more than one version of RxJS. Could you try the following: https://github.com/nrwl/nx/issues/2458

@evtk
Copy link
Author

evtk commented Mar 23, 2020

@vsavkin your fix with npm resolutions worked. After updating to NX 9, it seems it works even without it. I'll close this one up.

@evtk evtk closed this as completed Mar 23, 2020
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants