Skip to content

[solid-query] Uncaught (in promise) Error: experimental_prefetchInRender feature flag is not enabled #8209

Open
@BierDav

Description

@BierDav

Describe the bug

When using the latest version of tanstack-query you get at least in solidjs for each query this error message in the console:

Uncaught (in promise) Error: experimental_prefetchInRender feature flag is not enabled

Your minimal, reproducible example

https://codesandbox.io/p/github/BierDav/temp-tanstack-query-ssr-bug/experimental-flag-warning

Steps to reproduce

  1. Just start it using bun i && bun dev

Expected behavior

No error message in the console, because the promise wasn't even accessed

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: Windows, Linux

Tanstack Query adapter

solid-query

TanStack Query version

v5.59.13

TypeScript version

No response

Additional context

I have looked into the code. It is not really that something went wrong, and more about that the promise which causes this issue is evaluated even though the feature is not set.

Probably the easiest solution is to replace the promise when the flag is not enable with a getter function which then only throws the error, when the promise is really accessed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions