question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: optimism.dep is not a function. (In 'optimism.dep()', 'optimism.dep' is undefined)

See original GitHub issue

I am migrating from react-apollo to @apollo/client, have tried a lot of things but was unable to fix this issue.

Error

package.json

"dependencies": {
    "@apollo/client": "^3.2.9",
    "@apollo/link-context": "^2.0.0-beta.3",
    "@react-native-community/async-storage": "~1.12.0",
    "@react-native-community/datetimepicker": "3.0.0",
    "@react-native-community/viewpager": "^4.1.6",
    "@react-navigation/drawer": "^5.11.4",
    "crypto": "^1.0.1",
    "crypto-js": "^4.0.0",
    "expo": "^39.0.3",
    "expo-facebook": "~9.0.0",
    "expo-font": "~8.3.0",
    "expo-google-app-auth": "^8.0.0",
    "expo-image-picker": "~9.1.0",
    "expo-notifications": "~0.7.2",
    "graphql": "^14.4.2",
    "moment": "^2.24.0",
    "native-base": "^2.13.8",
    "react": "16.13.1",
    "react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.0.tar.gz",
"react-native-aws3": "^0.0.9",
"react-native-gesture-handler": "~1.7.0",
"react-native-google-places-autocomplete": "^1.4.1",
"react-native-maps": "0.27.1",
"react-native-material-ripple": "^0.9.1",
"react-native-modal": "^11.5.6",
"react-native-modal-datetime-picker": "^9.0.0",
"react-native-multiple-select": "^0.5.3",
"react-native-paper": "^4.4.1",
"react-native-picker-select": "^6.3.3",
"react-native-screens": "~2.10.1",
"react-native-status-bar-height": "^2.4.0",
"react-native-tab-view": "^2.15.2",
"react-native-testing-library": "^6.0.0",
"react-native-vector-icons": "^6.6.0",
"react-native-web": "~0.13.7",
"react-navigation": "^4.4.2",
"react-navigation-drawer": "^1.4.0",
"react-navigation-stack": "^1.7.3",
"react-navigation-tabs": "^1.2.0"

},

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dhavaljardoshcommented, Dec 2, 2020

@benjamn yes I did verify that optimism has 0.13.1. Btw was stuck on this for 2 days, did cache cleaning, package installation and re-installation and everything and nothing worked.

And miraculously right now it worked. And its without any cache or npm installation. Let me see if this issue pops up again(will monitor it for a day), if it doesn’t will close the issue.

0reactions
noudadrichemcommented, Dec 3, 2020

Sadly I’m getting this error only when building a docker image with Ubuntu. Building an image on MacOS works fine…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apollo Client TypeError: Object is not function - Stack Overflow
Am I doing something wrong? Here is my Code: TypeError: Object(...) is not a function 353 | 354 | function useBaseQuery(query, options, ...
Read more >
What "optimism" does to "apollo-cache-inmemory"
optimism is used for InMemoryCache to remember each node so that it doesn't have to construct the whole query cache tree every time...
Read more >
Configuring the Apollo Client cache - Apollo GraphQL Docs
A function that takes a response object and returns a unique identifier to be used when normalizing the data in the store.
Read more >
Transaction Details - Galileo POA Explorer
n getCacheInfo(cache).dep.dirty(rv);\n // Broadcast changes to any caches ... oqListener = () => {\n // If this.diff came from an optimistic ...
Read more >
Renovate Bot Package Diff
return collectSpecifierPaths(Object.keys(value).sort(), function (path) { return ... utilities/globals';\nimport { dep } from 'optimism';\nimport { equal } ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found