Skip to content

bug: createIsomorphicFn doesn't resolve callbacks when used in different vars #6206

Closed

Description

@nikuscs

Which project does this relate to?

Start

Describe the bug

When using isomorphic functions, the new compiler ignores the server() and client() when split across 2 different variables. I believe this happens because its looking at a specific ast node, and when used cant trace back to the original ref

Your Example Website or App

https://gist.github.com/nikuscs/f407a4561cf7f71fc25fe4703709c4cb

Steps to Reproduce the Bug or Issue

Check the gist, define a isomorphicfn in a variable and use it in another one. It will throw a no-op warning, because both server and client fns are stripped.

Expected behavior

To be able to resolve back the original variable so we can compose iso functions

Screenshots or Videos

No response

Platform

  • Router / Start Version: [e.g. 1.121.0]
  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Browser Version: [e.g. 91.1]
  • Bundler: [e.g. vite]
  • Bundler Version: [e.g. 7.0.0]

Additional context

Relevant discussion : https://discord.com/channels/719702312431386674/1453166955988123829

Activity

  1. coderabbitai commented on Dec 24, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Related PRs

    #4806 - docs(start): createIsomorphicFn and envOnly [merged]
    #5450 - fix: compile directive replacements [merged]
    #5650 - fix: fix static server functions [merged]
    #5702 - fix: run start compiler on imports from @tanstack/start-client-core [merged]
    #6166 - fix: trace nested server function factory re-export chain [merged]

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

  2. FerasAloudah commented on Dec 24, 2025

    @FerasAloudah

    I'm getting a no-op warning as well. I've tried both approaches, but neither worked on my side.

  3. schiller-manuel commented on Dec 25, 2025

    @schiller-manuel
    Collaborator

    i cannot reproduce this on https://github.com/TanStack/router/releases/tag/v1.143.6

    if this is still reproducable for you, please create a complete minimal reproducer project.

  4. added a commit that references this issue on Dec 25, 2025
    d161bcf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions