Next.js Discord

Discord Forum

Server Actions Fail when importing functions from Monorepo Packages

Unanswered
Thrianta posted this in #help-forum
Open in Discord
ThriantaOP
When I try to import createUser from my database package, the server action throws an error: "Unexpected indentifier: (actions-browser)". I can import and use createUser in RSCs and API routes, but just not in files that have "use server". I can also put the "use server" inside my database package and everything works fine, its just the importing that is the issue.

Please see the github question I posted for screen shots and a link to the repo:


https://github.com/vercel/next.js/discussions/58371

0 Replies