react` has to be installed - with VueJS
See original GitHub issueHello,
Intended outcome: Be able to use apollo-client with VueJS
Actual outcome:
This dependency was not found:
* react in ./node_modules/@apollo/client/react/context/ApolloContext.js, ./node_modules/@apollo/client/react/context/ApolloConsumer.js and 6 others
To install it, you can run: npm install --save react
How to reproduce the issue:
Use vue-cli
to create a new project, install apollo-upload-client@14.0.0
npm run serve
Thank you for your help.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:12
Top Results From Across the Web
Use Vue.js inside React.js properly! | by Ali Afsahnoudeh
We need to add Vue.js framework to our main codebase. ... Vue.s in our project (as script to our html file or just...
Read more >Vue.js vs React: We built an app on both frameworks
js and React offer a component library for building mobile apps. While React offers ReactNative,Vue.js offers VueNative. However, VueNative is a ...
Read more >Integrating React and Vue Components in One Application
Start by installing vuera and my grid library to a Vue application npm i vuera griz. React and React-DOM will also have to...
Read more >Switching From React To Vue.js
Thinking about a switch from React to Vue? They're similar beasts but with a few key differences. In this article I'll explain the ......
Read more >How to set up React and Vue.js on different environments
Since we already have Node and NPM installed, our first step is to install the latest stable version of Vue. This is indeed...
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 FreeTop 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
Top GitHub Comments
I later found that you can simply import from @apollo/client/core instead of @apollo/client to get reference to implementations that do not require react.
import { ApolloClient,ApolloQueryResult, InMemoryCache, NormalizedCacheObject, gql, HttpLink } from '@apollo/client/core’
https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/#using-apollo-client-without-react https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/#using-apollo-client-without-react
From the docs https://v4.apollo.vuejs.org/guide/installation.html#manual-installation just import from
@apollo/client/core
as @traviscollins says. It’s work for me too 😃