apollo-cache-policies icon indicating copy to clipboard operation
apollo-cache-policies copied to clipboard

React dependency need, after upgrade from 2.4.1 to 2.6.0

Open vsychov opened this issue 3 years ago • 4 comments
trafficstars

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.

vsychov avatar Mar 16 '22 08:03 vsychov

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

danReynolds avatar Mar 18 '22 15:03 danReynolds

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.

vsychov avatar Mar 21 '22 09:03 vsychov

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?

LiamKarlMitchell avatar Jul 28 '22 13:07 LiamKarlMitchell

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

vsychov avatar Aug 08 '22 21:08 vsychov