You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug: compiler error on arrow function implicit return in server functions - Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma.
#2441
Closed
SeyyedKhandon opened this issue
Sep 29, 2024
· 4 comments
Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma. Are you using the @tanstack/router-plugin/vite ?
As a user I expect it to support javascript syntax correctly, which means it should support any variant of functions that we pass to be considered a fully javascript compatible.
Screenshots or Videos
Platform
OS: Macos 15 sequia
Browser: Chrome 129.0.6668.60
Additional context
No response
The text was updated successfully, but these errors were encountered:
SeyyedKhandon
changed the title
Compiler error on arrow function implicit return in server functions - Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma.
Bug: Compiler error on arrow function implicit return in server functions - Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma.
Sep 29, 2024
SeyyedKhandon
changed the title
Bug: Compiler error on arrow function implicit return in server functions - Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma.
Bug: compiler error on arrow function implicit return in server functions - Invariant failed: createServerFn must be called with a function that is marked with the 'use server' pragma.
Sep 29, 2024
Which project does this relate to?
Start
Describe the bug
This issue is a follow up for #2434 discussion:
This server function:
results in :
while it works for:
Your Example Website or App
#2434
Steps to Reproduce the Bug or Issue
Expected behavior
As a user I expect it to support javascript syntax correctly, which means it should support any variant of functions that we pass to be considered a fully javascript compatible.
Screenshots or Videos
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: