-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Server action in 18.2.6 vs 18.2.8 is not longer able to import server action in client component #69818
Comments
For me had something similar issue: |
You aren't the only one affected by this issue, and it does not seem to be exclusive to server actions. We have an in-house component library that uses the same compound component compoisiton pattern like you see in Radix UI, e.g.
I've checked through our code and removed all references to |
The error message looks like gonna be fixed in #69749 and we will release a patch to get it fixed. I still like to ask for a reproduction that can help us reproduce it. It could either be a missing case or bad usage that might require changes in the future. |
We cannot recreate the issue with the provided information. Please add a reproduction in order for us to be able to investigate. Why was this issue marked with the
|
We patched a fix in 14.2.9, if it's the same issue with #69720, please upgrade to the new version 🙏 I'll close this one for now, if it's a different issue, please submit with a full reproduction, thanks. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which example does this report relate to?
any fresh project
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
My project is running in 14.2.6 nextjs version and actions api working fine when importing into client component. But when updating to 14.2.8 version, I am getting import error
Error: Cannot access AuthTemplate.then on the server. You cannot dot into a client module from a server component. You can only pass the imported name through.
at Object.get (*\node_modules.pnpm\next@14.2.8_@babel+core@7.25.2_react-dom@18.3.1_react@18.3.1__react@18.3.1\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:125427) {
digest: '815452591'
}
I validate the Server action import with 18.2.8 version in client component using "use client" and in actions file "use server".
The same is working fine in 18.2.6 but not in 18.2.8 version.
and I have to revert my app to again 18.2.6 to work as expected.
Expected Behavior
The actions functions should import in client component smoothly without any error, as per documentations.
To Reproduce
You will see the error
Change the nextjs version to 18.2.6
The text was updated successfully, but these errors were encountered: