[CodeConnoisseur (accepted answer)] I had a similar issue in next 14 where I was using an index.ts file to centralize my exports of server actions. The issue was that I needed to remove the 'use server' from the index.ts file itself. WRONG: ``` 'use server' /** * Simplify and centralize server action exports */ export { signIn } from "./signIn"; export { signOut } from "./signOut"; export { createComment } from "./createComment"; export { createPost } from "./createPost"; export { createTopic } from "./createTopic"; ``` CORRECT: Remove use server from top of file.

Context: Stack Overflow #76957592 (accepted answer, 20 votes, 3 answers): I am trying to use layout.tsx in the app directory of Next.js 13 to have a nav layout that is present on all the pages. I managed to make it so that when the user logs out/signs in, the navbar changes, but the issue is that I have to refresh the page (F5) to see the change on the navbar. I think this issue is related to the cache, and that's why I am trying to use export const dynamic = 'force-dynamic'. I also added the client component to a server component because I thought that would be the issue, but it didn't solve the problem. I wanted to use export const dynamic = 'force-dynamic' to de

## Matched source
Source: Published skill
Original query: "Error: "Only async functions are allowed to be exported in a 'use server' file""
Also searched as: ""Only async functions are allowed to be exported in a 'use server' file""
Key terms: allowed, async, error, exported, file, functions, only, server
