-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to import in Next 15 due to registerApolloClient #383
Comments
You should only get that if you try to import I see that you do a |
I had to pass the use server directive in that file for the import to work and it no longer crashes. but it does cause a type error here it builds/works in dev, but not sure if that's how it's supposed to be. here's the index.ts that exports things (this is all in a transpiled next.js package) and how it gets exported in the package.json not sure if any of this helps, but trying to give you some context of how it's used |
Yeah, you definitely shouldn't use the "use server", it turns everything there into server functions, not server components. I assume that your I'm afraid, but with RSC/Next.js you can't use barrel files like that - you either have to create a |
Got it, that makes perfect sense - thanks a lot @phryneas ! |
Hi,
It looks like
@apollo/experimental-nextjs-app-support
is throwing an error where it can't findregisterApolloClient
.Not sure if it's because of it importing from
index.ssr.js
vs. another file, or what I'm doing wrong.Would appreciate some help!
Thanks!
Code:
Server Error:
The text was updated successfully, but these errors were encountered: