You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The React module node_modules/@apollo/client/react/ is being imported for Vue projects. I can't fathom why that is: the entire repository (see reproduction) has not a single occurrence of the word "react".
Since React is not installed (which is expected), the React dependency cannot be resolved.
This is an accident of history (backwards compatibility) that will undoubtedly be improved in AC4 (the next major version), and is currently tracked in this issue: #8190
In the meantime, instead of importing from the top-level @apollo/client package (which regrettably includes @apollo/client/react), you can import from @apollo/client/core (which does not). In case that doesn't work, importing explicitly from the @apollo/client/core/index.js module may do the trick. I don't think Vite requires the explicit index.js module, but that trick may be useful with other bundlers.
The React module
node_modules/@apollo/client/react/
is being imported for Vue projects. I can't fathom why that is: the entire repository (see reproduction) has not a single occurrence of the word "react".Since React is not installed (which is expected), the React dependency cannot be resolved.
Reproduction: https://github.com/brillout/graphql-apollo_vite-3_bug-1.
The text was updated successfully, but these errors were encountered: