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
SyntaxError: Named export 'ApolloLink' not found. The requested module '@apollo/client' is a CommonJS module, which may not support all module.exports as named exports.
#297
Closed
schmidsi opened this issue
Oct 22, 2022
· 5 comments
I think it is an issue with Apollo Client. apollographql/apollo-feature-requests#287
However we can convert named imports to default or * as but this would break treeshaking.
Thanks for investigating. For my current purpose of building a tech demo/starterkit for the full Graph stack, tree shaking is not a hard requirement. Not sure about other users though?
If there is a fix that we can implement now and remove after Apollo Client fixed it on their side, I think this would be the way to go. Happy to implement a hack in my repo like resolutions or transpileModules but I don't think that this will work in that situation? I'm not an expert with this whole transpiling, importing thing.
Running into this error while trying to load Graph Client with Apollo and Next.js.
Relevant code might be here: https://github.com/schmidsi/hackathon-starterkit/blob/main/frontend/lib/apolloClient.js
The text was updated successfully, but these errors were encountered: