process is not defined error when calling server function
Hello, I am trying to call a dummy server function inside my app context like this:
test server fn:
Error:
createClientRpc uses process:
I guess that server code is leaking into my client code 😭 but I dont know the cause19 Replies
rival-black•3mo ago
which version of start are you using?
fascinating-indigoOP•3mo ago
@tanstack/react-start@1.131.49
I have upgraded to 1.132, but now createServerRootRoute no longer exists ☹️ and I don't find any references about it in the docs or in github, what the ...?ratty-blush•3mo ago
Server Routes | TanStack Start React Docs
Server routes are a powerful feature of TanStack Start that allow you to create server-side endpoints in your application and are useful for handling raw HTTP requests, form submissions, user authenti...
ratty-blush•3mo ago
There's brand new breaking changes with the latest release.
fascinating-indigoOP•3mo ago
Oh dang... thanks for the info, but I am still unable to find anything 😭😭 Why searching for references of
createServerRootRoute in github/tanstack docs does not show anything?ratty-blush•3mo ago
Yeah at this moment, better to wait for everything to roll out...
fascinating-indigoOP•3mo ago
watching history of the web in real time, what a time to be alive
ratty-blush•3mo ago
oh yes baby
That's exactly the docs i was missing lol
fascinating-indigoOP•3mo ago
Now I can not overcome this issue 😭
rival-black•3mo ago

rival-black•3mo ago
GitHub
Start BETA - Tracking · TanStack router · Discussion #2863
Tracking any important changes for TanStack Start during the BETA period. If you are coming from the ALPHA of TanStack Start, you can see all the breaking changes that were made here - #2403
fascinating-indigoOP•3mo ago
Yeeeah, just found this: https://github.com/TanStack/router/blob/0b33aa5cb40a585f19a3876d2ef5e7ae06338f2e/examples/react/start-basic/src/router.tsx
Thanks Manuel! ❤️
GitHub
router/examples/react/start-basic/src/router.tsx at 0b33aa5cb40a585...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
absent-sapphire•2mo ago
@Jaime02 @Manuel Schiller If you guys could provide an update on this, recently upgraded from 1.2.23 to 1.2.32 and now my serverFns are showing up on the client ("createClientRpc.js?v=5d579772:9 Uncaught (in promise) ReferenceError: process is not defined") even though all of the docs I have read says that tanstack start splits them automatically
No other errors
harsh-harlequin•2mo ago
Facing the same exact issue @̾̒̊҉̱̹͙ ͧͬͤ did you manage to solve this?
Only happens in dev mode, when building it works fine.
harsh-harlequin•2mo ago
package.json:

harsh-harlequin•2mo ago
noticed it only happens when
hmr: false in vite.config.ts, strange...rival-black•2mo ago
can you please provide a complete example project ?
same for you @Ariel
absent-sapphire•2mo ago
it went away for me sometime when i was reviewing the migration process on github
absent-sapphire•2mo ago
for me it was an issue in both, i recommend you look at this really closely https://github.com/TanStack/router/discussions/2863#discussioncomment-14052148
GitHub
Start BETA - Tracking · TanStack router · Discussion #2863
Tracking any important changes for TanStack Start during the BETA period. If you are coming from the ALPHA of TanStack Start, you can see all the breaking changes that were made here - #2403