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
{{ message }}
Repository navigation
Dev server broken with @tanstack/solid-start and @cloudflare/vite-plugin #5338
Im unable to start the dev server with Tanstack Solid Start and Cloudflare. The app crashes with the error Error: getContextId cannot be used under non-hydrating context.
PS: The app runs without issues when deployed on cloudflare workers.
importtsConfigPathsfrom"vite-tsconfig-paths";import{defineConfig}from"vite";import{tanstackStart}from"@tanstack/solid-start/plugin/vite";import{cloudflare}from'@cloudflare/vite-plugin'importviteSolidfrom"vite-plugin-solid";importtailwindcssfrom"@tailwindcss/vite";exportdefaultdefineConfig({server: {port: 3000,},plugins: [{// cloudflare workaround for devname: "remove-ssr-external",configResolved(config){config.environments.ssr.resolve.external=[];},},cloudflare({viteEnvironment: {name: "ssr"}}),tsConfigPaths(),tanstackStart({srcDirectory: "src",server: {entry: "src/server.ts",},client: {entry: "src/client.tsx",}}),// solid's vite plugin must come after start's vite pluginviteSolid({ssr: true}),tailwindcss(),],});
Try removing https://github.com/HoaX7/focusroom/blob/main/src/lib/bindings.ts in favour of simply using `import { env } from "cloudflare:workers". The CF vite plugin should handle bindings for you.
We've made quite a few improvements to Tanstack Solid Start as well as support for the cloudflare vite plugin. Could you check if upgrading solves your issues? Here is an example you can follow
Activity
jperasmus commentedon Oct 7, 2025
Try removing
https://github.com/HoaX7/focusroom/blob/main/src/lib/bindings.tsin favour of simply using `import { env } from "cloudflare:workers". The CF vite plugin should handle bindings for you.HoaX7 commentedon Oct 8, 2025
@jperasmus yes I did remove it but that isn't the problem. The dev env isn't starting at all. Anyway I switched to using react.
brenelz commentedon Oct 21, 2025
We've made quite a few improvements to Tanstack Solid Start as well as support for the cloudflare vite plugin. Could you check if upgrading solves your issues? Here is an example you can follow
https://github.com/TanStack/router/tree/main/examples/solid/start-basic-cloudflare