TypeError: optimism.dep is not a function. (In 'optimism.dep()', 'optimism.dep' is undefined)
See original GitHub issueI am migrating from react-apollo
to @apollo/client
, have tried a lot of things but was unable to fix this issue.
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:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
Sadly I’m getting this error only when building a docker image with Ubuntu. Building an image on MacOS works fine…