Skip to content

Incompatible with next-safe-action #722

@LubomirGeorgiev

Description

@LubomirGeorgiev

I am trying to use https://github.com/next-safe-action/next-safe-action with Vinext but I am getting this error

12:21:32 AM [vite] Internal server error: unsupported non async function
  Plugin: rsc:use-server
  File: /Users/[USER]/projects/vinext-nextjs/src/test.action.ts:5:0
  1  |  "use server";
  2  |  import { actionClient } from "./lib/safe-action";
  3  |  export const testAction = actionClient.action(async () => {
     |  ^
  4  |          return { message: "Hello, world!" };
  5  |  });

Steps to reproduce

  1. Clone https://github.com/LubomirGeorgiev/vinext-next-safe-action
  2. Run pnpm dev:vinext

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions