[Turbo] - The "use server" directive must be at the top of the file. #64863
Replies: 8 comments 2 replies
-
I'm having the same issue, did you find any workaround for this? |
Beta Was this translation helpful? Give feedback.
-
My code makes same issue |
Beta Was this translation helpful? Give feedback.
-
this issue is still persisting [email protected] any workaround or permanent fixes ? |
Beta Was this translation helpful? Give feedback.
-
Same for me. |
Beta Was this translation helpful? Give feedback.
-
Same issue with my project as well. |
Beta Was this translation helpful? Give feedback.
-
I think If useQuery have "use client"?? |
Beta Was this translation helpful? Give feedback.
-
Server components are not allowed to use any hooks. Get rid of useQuery and it would do. |
Beta Was this translation helpful? Give feedback.
-
Summary
Hey, i was trying out turbo on a repo for work, which runs fine normally, when moving over to turbo i get this error on dev
Build Error
Failed to compile
Next.js (14.3.0-canary.15) (turbo)
./src/components/SearchBox/functions.ts:1:1
Ecmascript file had an error
The "use server" directive must be at the top of the file.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions