T
TanStack6mo ago
correct-apricot

Vite warning node:fs when using StartClient component

Vite gives me warnings like:
[plugin vite:resolve] Module "node:fs" has been externalized for browser compatibility, imported by "/Users/jasonkuhrt/CascadeProjects/vite-webapp/node_modules/.pnpm/@tanstack+start-client-core@1.114.25/node_modules/@tanstack/start-client-core/dist/esm/createServerFn.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
[plugin vite:resolve] Module "node:fs" has been externalized for browser compatibility, imported by "/Users/jasonkuhrt/CascadeProjects/vite-webapp/node_modules/.pnpm/@tanstack+start-client-core@1.114.25/node_modules/@tanstack/start-client-core/dist/esm/createServerFn.js". See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
When I import import { StartClient } from '@tanstack/react-start' following docs at https://tanstack.com/router/latest/docs/framework/react/guide/ssr#rendering-the-application-on-the-client . Any tips on what to do here?
SSR | TanStack Router React Docs
Server Side Rendering (SSR) is the process of rendering a component on the server and sending the HTML markup to the client. The client then hydrates the markup into a fully interactive component. The...
2 Replies
correct-apricot
correct-apricotOP6mo ago
GitHub
Start - Server Function Middleware Included in Client Bundle · Iss...
Which project does this relate to? Start Describe the bug Calling a serverFn using middleware in the client with useServerFn results in server side code being included in client bundle. I'll tr...
deep-jade
deep-jade6mo ago
What does your serverFn look like?

Did you find this page helpful?