React-apollo: currentObservable.query.resetQueryStoreErrors is not a function

Created on 15 Aug 2019  路  5Comments  路  Source: apollographql/react-apollo

Intended outcome:
I upgraded to [email protected] and I expected that my existing ReactApollo code would still work.

Actual outcome:
After upgrading I'm seeing errors all over the console like

react-hooks.esm.js:163 Uncaught TypeError: _this.currentObservable.query.resetQueryStoreErrors is not a function
    at react-hooks.esm.js:163

Call stack:
Screen Shot 2019-08-14 at 11 39 38 PM

How to reproduce the issue:
I'm not sure how to reproduce other than to have been using Mutation and Query from [email protected] and then upgrade to @3.0.0

Version
3.0.0

  System:
    OS: macOS 10.14.6
  Binaries:
    Node: 10.15.0 - ~/.nvm/versions/node/v10.15.0/bin/node
    Yarn: 1.13.0 - ~/.nvm/versions/node/v10.15.0/bin/yarn
    npm: 6.10.3 - ~/.nvm/versions/node/v10.15.0/bin/npm
  Browsers:
    Chrome: 76.0.3809.100
    Firefox: 68.0
    Safari: 12.1.2
  npmPackages:
    apollo-boost: ^0.4.2 => 0.4.2
    apollo-link-context: ^1.0.17 => 1.0.17
    apollo-link-ws: ^1.0.17 => 1.0.17
    react-apollo: ^3.0.0 => 3.0.0

Most helpful comment

@hwillson That did it! Thank you Sir for your time. Greatly appreciated. Hopefully this helps someone else running a similar stack.

All 5 comments

@coreysnyder Updating apollo-client to the most recent version will fix this issue. Thanks!

@hwillson I just updated to 3.0.1 and I'm still seeing these errors in the logs. Any ideas? I'm using CRA with these dependencies:

  "dependencies": {
    "@apollo/react-hooks": "^3.0.0",
    "apollo-boost": "^0.4.2",
    "apollo-link-context": "^1.0.17",
    "apollo-link-ws": "^1.0.17",
    "babel-plugin-styled-components": "^1.10.6",
    "bootstrap": "4.3",
    "eslint-plugin-flowtype": "^3.10.3",
    "formik": "^1.0.1",
    "graphql": "^14.3.1",
    "moment": "^2.24.0",
    "node-sass": "^4.12.0",
    "react": "^16.8.6",
    "react-apollo": "3.0.1",
    "react-bootstrap": "^1.0.0-beta.9",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.0",
    "react-router": "^5.0.1",
    "react-router-dom": "^5.0.1",
    "react-scripts": "3.0.1",
    "react-spinners": "^0.5.13",
    "react-star-rating-component": "^1.4.1",
    "rxjs": "^6.5.2",
    "styled-components": "^4.3.2",
    "subscriptions-transport-ws": "^0.9.16",
    "underscore": "^1.9.1"
  }

@coreysnyder Make sure you're using apollo-client >= 2.6.3. Since it looks like you're using apollo-boost, double check that the version of apollo-client it's using behind the scenes is >= 2.6.3.

@hwillson That did it! Thank you Sir for your time. Greatly appreciated. Hopefully this helps someone else running a similar stack.

I was having the same error, and change apollo-client version did not fix it.
So... I deleted all node_modules, reinstall it and error was gone.

tnx for your answers!

Was this page helpful?
0 / 5 - 0 ratings