TanStack / TanStack/devtools

Incompatibility with Cloudflare Vite Plugin

Aperta
#375 16 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
499
Fork
100
Merge medio
1g 17h
PR unite (30g)
4

Descrizione

TanStack Devtools version

0.9.9

Framework/Library version

Tanstack start RC (1.132.0)

Describe the bug and the steps to reproduce it
  1. Create a tanstack start project from scratch

  2. Follow the official guide for configuring tanstack start with cloudflare:

https://tanstack.com/start/latest/docs/framework/react/guide/hosting#cloudflare-workers--official-partner

  1. Install the different tanstack plugins.

I managed to replicate them using these versions:

  • "@tanstack/react-query-devtools": "^5.84.2"
  • "@tanstack/react-form-devtools": "^0.2.17"
  • "@tanstack/react-pacer-devtools": "^0.5.2"
  • "@tanstack/react-router-devtools": "^1.132.0"
  1. Try to import the plugins and add them to <TanStackDevTools/>
function RootDocument({ children }: Props) {
	return (
		<html>
			<head>
				<HeadContent />
			</head>
			<body>
				<TanStackDevtools
					plugins={[
						{
							name: "Tanstack Router",
							render: <TanStackRouterDevtoolsPanel />,
						},
						{
							name: "Tanstack Query",
							render: <ReactQueryDevtoolsPanel />,
						},
						// These last two break the app when executing anything SSR
						{
							name: "Tanstack Form",
							render: <FormDevtoolsPanel />,
						},
						{
							name: "Tanstack Pacer",
							render: <PacerDevtoolsPanel />,
						},
					]}
				/>
				<Scripts />
			</body>
		</html>
	);
}

The issue only occurs when executing anything SSR:

✘ [ERROR] No matching export in "node_modules/.pnpm/solid-js@1.9.10/node_modules/solid-js/web/dist/server.js" for import "use"

    node_modules/.pnpm/@tanstack+devtools-utils@0.3.1_@types+react@19.2.2_csstype@3.1.3_react@19.2.0_solid-js@1.9.10/node_modules/@tanstack/devtools-utils/dist/solid/esm/dev.js:1:34:
      1 │ ...eateComponent, insert, use, template } from 'sol...
        ╵                           ~~~

Plugins affected

Funningly enough, this only happens with certain plugins. Some plugins work and some other's don't. Here's the list of what I've experienced:

  • Tanstack Router ✔️
  • Tanstack Query ✔️
  • Tanstack Pacer ❌
  • Tanstack Form ❌

Temporary fix

The issue disapears when I remove the cloudflare plugin. As I use this only for develpoment purposes, I can simply comment the code out, use the plugin and then put it back in when im done with development.

Thank you!

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://github.com/randreu28/devtools_issue_375

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms & Code of Conduct
  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con l’esempio minimo riproducibile collegato e riproduci SSR con il plugin Cloudflare e i pannelli Form o Pacer. Ispeziona @tanstack/devtools-utils/dist/solid/esm/dev.js e l’errore di importazione del server Solid segnalato; il lavoro è completato quando i plugin interessati funzionano durante SSR con il plugin Cloudflare abilitato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
react, typescript
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.