NF-031: Server Action not found
The remote answered a Server Action request with 404: the id in the X-NF-Action header is not a 'use server' function in the build that served the...
Why This Error Occurred
The remote answered a Server Action request with 404: the id in the X-NF-Action header is not a 'use server' function in the build that served the request. Usually the page came from one build and the action went to another, or the export was renamed or removed.
Possible Ways to Fix It
-
Reload the page so the island and its action ids come from the same build.
-
Export the function from a file that starts with
'use server':'use server' export async function addToCart(id: string) {} -
Check that the remote build in use contains the action.
Useful Links
NF-030: Remote component server code required a module the host does not provide
A remote build's server code called require() for a module the host does not hand out. The host resolves only the remote's own files and...
NF-032: Server Action request is invalid
The remote rejected a request to /nf/action with 400 before running any action, or with 413 because the body is over its limit (1 MiB by default). A plain...