NerdWalletOSS / apollo-cache-policies

An extension of the Apollo 3 cache with support for advanced cache policies.
Apache License 2.0
152 stars 22 forks source link

React dependency need, after upgrade from 2.4.1 to 2.6.0 #51

Open vsychov opened 2 years ago

vsychov commented 2 years ago

Hello,

after upgrade from 2.4.1 to 2.6.0 on quasar based project, I'm getting error about missing react dependency:

 App •  ERROR  •  Client-side  in ./node_modules/@apollo/client/react/context/ApolloConsumer.js

Module not found: Can't resolve imported dependency "react"
Did you forget to install it? You can run: yarn add react

 App •  ERROR  •  Client-side  in ./node_modules/@apollo/client/react/hooks/useApolloClient.js

Module not found: Can't resolve imported dependency "react"
Did you forget to install it? You can run: yarn add react

 App •  COMPILATION FAILED  • Please check the log above for details.

error Command failed with exit code 1.
danReynolds commented 2 years ago

React isn't a dependency on the project, only a dev dependency. Does your project use react?

vsychov commented 2 years ago

My project don't use react, but looks like after update 2.4.1 to 2.6.0 apollo-cache-policies trying to call something from apollo, that needs react.

LiamKarlMitchell commented 2 years ago

Is there a way to get the ttl cache policies working without react I'm using Apollo Core (With Vue Apollo). @vsychov did you find solution for this already?

vsychov commented 2 years ago

@LiamKarlMitchell , you can use 2.4.1 version, it's works well