question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nuxt-bridge apollo composable

See original GitHub issue

Environment

Operating System: Darwin Node Version: v16.15.0 Nuxt Version: 2.16.0-27358576.777a4b7f Package Manager: yarn@1.22.19 Builder: webpack User Config: srcDir, ssr, dev, alias, privateRuntimeConfig, plugins, buildModules, modules, apollo, vuetify, build, bridge Runtime Modules: @nuxtjs/apollo@4.0.1-rc.5 Build Modules: @nuxtjs/vuetify@1.12.3, @nuxt/bridge@3.0.0-27495135.4d1a6ba

Reproduction

https://github.com/stephenjason89/nuxt-bridge

Describe the bug

Apollo composable throws

[vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.

When page is rendered from the server side. Error is not present while navigating to that page on the client side.

Try refreshing the page to see the error while on composition.vue page or by visiting composition.vue directly

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
stephenjason89commented, Jul 20, 2022

@antlionguard vue-template-babel-compiler is what caused the script setup to not work properly. removing it fixed the issue.

0reactions
stephenjason89commented, Jul 19, 2022

@antlionguard I pushed a new commit to the repo that shows the problem.

Adding this didn’t seem to help, I think it is autoImports:true by default right?

bridge: {
   autoImports: true
},
image

also, out of topic, what can i do with this warning? image

Read more comments on GitHub >

github_iconTop Results From Across the Web

nuxt-bridge-with-vue-apollo-composables - CodeSandbox
nonlinearcom/nuxt-bridge-vue-apollo-composables. Environmentnuxt. This sandbox is in sync with main on GitHub. You have to fork to make changes
Read more >
nonlinearcom/nuxt-bridge-vue-apollo-composables - GitHub
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may...
Read more >
How to provide $apollo for Nuxt 2 Bridge composition API?
There's an open issue with some examples of using @vue/apollo-composable but they don't work with Nuxt 2 Bridge.
Read more >
Nuxt 3 + Apollo Client - DEV Community ‍ ‍
Here's how to get apollo client up and running with nuxt 3. ... import { DefaultApolloClient } from "@vue/apollo-composable" export default ...
Read more >
@vue/apollo-composable - npm
Dependents (30) · @peeky/client · @moonreach/nuxt · @ipr/vuex-graphql-api · @niama/api · @ejez/quasar-app-extension-apollo · upvue ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found