apollo
apollo copied to clipboard
$apollo and $apolloHelpers are unknown
Environment
- Operating System: Darwin
- Node Version: v20.9.0
- Nuxt Version: 3.8.2
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: -
- Runtime Modules: -
- Build Modules: -
Describe the bug
It should be typed correctly
Expected behaviour
Type should be known
Reproduction
https://github.com/ibockowsky/nuxt3-apollo-undefined-reproduction
Additional context
No response
Logs
No response
I'm having the same problem with Bun and Nuxt 3.10, a workaround is:
const apolloc = useApolloClient();
const apollo = useApollo();
@ehsanonline @ibockowsky Are you using bundler
as resolution in typescript\tsConfig\compilerOptions
inside of nuxt.config.ts
or as of 3.10 natively via. Nuxt?
If so, it might be related to this one: https://github.com/nuxt-modules/apollo/issues/593
Try turning off bundler
resolution.