Reputation: 441
I'm trying to install vue apollo as boot in quasar
Boot file : src/boot/vue-apollo.js
import VueApollo from 'vue-apollo'
import ApolloClient from 'apollo-boost'
const apolloClient = new ApolloClient({
uri: process.env.GRQPHQL_API
})
const apolloProvider = new VueApollo({
defaultClient: apolloClient
})
export default async ({ Vue, app }) => {
Vue.use(VueApollo)
app.apolloProvider = apolloProvider
}
Error :
These dependencies were not found:
* graphql/language/parser in ./node_modules/graphql-tag/src/index.js
* graphql/language/printer in ./node_modules/apollo-link-http-common/lib/bundle.esm.js
* graphql/language/visitor in ./node_modules/apollo-client/bundle.esm.js, ./node_modules/apollo-utilities/lib/bundle.esm.js
To install them, you can run: npm install --save graphql/language/parser graphql/language/printer graphql/language/visitor
I found a solution : install graphql package npm install --save graphql
, but it's not working
Upvotes: 0
Views: 985
Reputation: 21
I had the same issue, and was able to fix it by uninstalling the Apollo Client app extension from Quasar:
quasar ext remove @quasar/apollo
And then reinstalling the app extension:
quasar ext add @quasar/apollo
I hope this helps somebody.
Upvotes: 2
Reputation: 31
I have just set up Quasar with Apollo Boost and Vue Apollo, and I was not able to replicate the issue you are describing.
Here are my steps:
quasar
cli toolyarn add vue-apollo graphql apollo-boost
boot
array in quasar.conf.js
It works fine. I even tried removing the value of the env variable, just to cover all the bases.
See the output for quasar info
below for my config.
Operating System - Linux(5.3.11-300.fc31.x86_64) - linux/x64
NodeJs - 12.13.0
Global packages
NPM - 6.12.0
yarn - 1.17.3
@quasar/cli - 1.0.0-beta.2
cordova - Not installed
Important local packages
quasar - 1.4.5 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
@quasar/app - 1.2.4 -- Quasar Framework local CLI
@quasar/extras - 1.3.3 -- Quasar Framework fonts, icons and animations
vue - 2.6.10 -- Reactive, component-oriented view layer for modern web interfaces.
vue-router - 3.1.3 -- Official router for Vue.js 2
vuex - 3.1.1 -- state management for Vue.js
electron - Not installed
electron-packager - Not installed
electron-builder - Not installed
@capacitor/core - Not installed
@capacitor/cli - Not installed
@capacitor/android - Not installed
@capacitor/ios - Not installed
@babel/core - 7.7.4 -- Babel compiler core.
webpack - 4.41.2 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
webpack-dev-server - 3.9.0 -- Serves a webpack app. Updates the browser on changes.
workbox-webpack-plugin - 4.3.1 -- A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
register-service-worker - 1.6.2 -- Script for registering service worker, with hooks
Quasar App Extensions
*None installed*
I hope this helps.
Upvotes: 1