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
@tanstack/react-start v1.134.7 causes import error with use-sync-external-store #5717
When I upgrade to to v1.134.7 of @tanstack/react-start, I get a runtime error if I view a react component that imports tanstack-store. I personally triggered this by using tanstack-form which uses store underneath.
tanstack-store uses use-sync-external-store which is only published as cjs.
I was able to replicate this by cloning the start-basic template and adding tanstack forms.
The issue goes away when I switch to "@tanstack/react-start": "1.134.6",
hook.js:608 SyntaxError: The requested module '/node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/with-selector.js?v=d9f62913' does not provide an export named 'useSyncExternalStoreWithSelector' (at index.js?v=d9f62913:1:10)
The above error occurred in the <Lazy> component.
React will try to recreate this component tree from scratch using the error boundary you provided, CatchBoundaryImpl.
I was still facing this error in my environment.
I suspect it might be related to pnpm workspace, though I'm not entirely sure about the root cause.
As a quick workaround, I manually ran pnpm install use-sync-external-store and added import "use-sync-external-store" somewhere in my code. This resolved the error for me on the latest version.
Reacted by Aaron Hammer, Itta Funahashi and Brandon (opti)
Same. The other day Clerk was working though I don't remember seeing the error. Now it's not (SignInButton/SignUpButton do nothing on click). Is yours still working?
@wobsoriano I fixed it by not following the official docs, but the github quick start project at https://github.com/clerk/clerk-tanstack-react-start-quickstart/
the vite.config setup should be mentioned on the official docs and the github project starter, but there is no mention on official docs about vite.config setup
@wobsoriano I fixed it by not following the official docs, but the github quick start project at https://github.com/clerk/clerk-tanstack-react-start-quickstart/ the vite.config setup should be mentioned on the official docs and the github project starter, but there is no mention on official docs about vite.config setup
Also getting this same error when importing TanStack Form in a TanStack start project: import { useForm } from '@tanstack/react-form'
Using latest versions:
Activity
rnkdsh commentedon Nov 1, 2025
same
Aias commentedon Nov 1, 2025
Thanks for writing this up, affecting me too
thanakit-p commentedon Nov 1, 2025
I facing this problem too thanks.
the10xProcrastinator commentedon Nov 1, 2025
Also getting this same error when importing TanStack Form in a TanStack start project:
import { useForm } from '@tanstack/react-form'Using latest versions:
Rolling back "@tanstack/react-start" from 1.134.7 --> 1.134.6 fixes the issue for me.
bitpickle commentedon Nov 2, 2025
Same here!
inaridiy commentedon Nov 28, 2025
Same here!
inaridiy commentedon Nov 28, 2025
I was still facing this error in my environment.
I suspect it might be related to pnpm workspace, though I'm not entirely sure about the root cause.
As a quick workaround, I manually ran
pnpm install use-sync-external-storeand addedimport "use-sync-external-store"somewhere in my code. This resolved the error for me on the latest version.flyingduck92 commentedon Jan 17, 2026
I have the same issue when using clerk
dominictobias commentedon Jan 28, 2026
Same. The other day Clerk was working though I don't remember seeing the error. Now it's not (SignInButton/SignUpButton do nothing on click). Is yours still working?
wobsoriano commentedon Jan 28, 2026
@flyingduck92 @dominictobias Are you still having issues with the Clerk TanStack SDK? Here's a temporary solution if you're still having issues with
use-sync-external-store.@dominictobias Are you seeing any console errors? I'm guessing you don't have a sign in and sign up page configured
flyingduck92 commentedon Jan 29, 2026
@wobsoriano I fixed it by not following the official docs, but the github quick start project at https://github.com/clerk/clerk-tanstack-react-start-quickstart/
the vite.config setup should be mentioned on the official docs and the github project starter, but there is no mention on official docs about vite.config setup
ConanMcN commentedon Mar 2, 2026
Thanks, this fixed it for me!
flyingduck92 commentedon Mar 3, 2026
@ConanMcN Glad It helps. Happy coding sir
sleeyax commentedon Mar 4, 2026
I'm experiencing this issue as well on:
I got it working by adding the following to
vite.config.ts. This is based on the changes introduced in #5726.wobsoriano commentedon Mar 4, 2026
FYI @flyingduck92 @ConanMcN @dominictobias we released Clerk Core 3 which includes the migration from
swrto@tanstack/react-querymeaning this error is gone.sithu-khant commentedon Jun 25, 2026
This works for me.