Skip to content

[Bug?]: "invalid server function" when having a server function without a router #2168

Description

@huseeiin

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Error: invalid server function: 29bb30aa-0-test

Expected behavior 🤔

No response

Steps to reproduce 🕹

const test = () => {
  "use server";
  return 1;
};

export default function App() {
  return (
    <>
      <h1
        onClick={() => {
          test();
        }}
      >
        hi
      </h1>
    </>
  );
}

then click the h1

Context 🔦

No response

Your environment 🌎

version 2.0.0-alpha.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions