Here you will find the errors that led me to discover that Apollo Client needed upgrading.
Because there is a knowledge gap with React Hooks, I was trying to utilize React Hooks Compose in efforts to preserve the withMUITheme and withRouter methods that contain the most recent updates from Stephen.
Currently, due to Recompose deprecation errors, we have to move away from it and upgrade our graphql to version 16.18.1 but that is a breaking change for Apollo Client and here we are.
Below is what came up on my terminal as I tried to work this upgrade. I'm sure you can replicate this error by simply running: npm install --save graphql@16.18.1
> npm install --save graphql@16.18.1
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN apollo-cache-inmemory@"^1.6.6" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0" from apollo-client@2.6.4
npm WARN node_modules/apollo-client
npm WARN apollo-client@"^2.6.4" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-link@1.2.14
npm WARN node_modules/apollo-link
npm WARN apollo-link@"^1.0.0" from apollo-client@2.6.4
npm WARN node_modules/apollo-client
npm WARN 5 more (apollo-link-error, apollo-link-http, ...)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-link-http@1.5.17
npm WARN node_modules/apollo-link-http
npm WARN apollo-link-http@"^1.5.17" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-utilities@1.3.4
npm WARN node_modules/apollo-utilities
npm WARN apollo-utilities@"^1.3.4" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN 4 more (apollo-cache-inmemory, apollo-link, graphql-tools, the root project)
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@">=0.5.0" from graphql-date@1.0.3
npm WARN node_modules/graphql-date
npm WARN graphql-date@"^1.0.3" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" from graphql-tag@2.12.6
npm WARN node_modules/graphql-tag
npm WARN graphql-tag@"^2.10.3" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0" from graphql-tools@2.24.0
npm WARN node_modules/graphql-tools
npm WARN graphql-tools@"^2.8.0" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: spoke@13.1.0
npm WARN Found: graphql@0.13.2
npm WARN node_modules/graphql
npm WARN peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-cache@1.3.5
npm WARN node_modules/apollo-cache
npm WARN apollo-cache@"^1.3.5" from apollo-cache-inmemory@1.6.6
npm WARN node_modules/apollo-cache-inmemory
npm WARN 16 more (apollo-cache-control, apollo-cache-inmemory, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer graphql@">=0.8.0" from graphql-type-json@0.3.2
npm WARN node_modules/graphql-type-json
npm WARN graphql-type-json@"^0.3.2" from the root project
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: spoke@13.1.0
npm ERR! Found: graphql@undefined
npm ERR! node_modules/graphql
npm ERR! graphql@"16.18.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-link@1.2.14
npm ERR! node_modules/apollo-link
npm ERR! apollo-link@"^1.2.14" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/ariqueaguilar/.npm/_logs/2023-12-08T19_17_02_975Z-eresolve-report.txt
Here you will find the errors that led me to discover that Apollo Client needed upgrading.
Because there is a knowledge gap with React Hooks, I was trying to utilize React Hooks Compose in efforts to preserve the
withMUITheme
andwithRouter
methods that contain the most recent updates from Stephen.Currently, due to
Recompose
deprecation errors, we have to move away from it and upgrade ourgraphql
toversion 16.18.1
but that is a breaking change forApollo Client
and here we are.Here is the Apollo Migration Documentation
Below is what came up on my terminal as I tried to work this upgrade. I'm sure you can replicate this error by simply running:
npm install --save graphql@16.18.1