T
TanStack4mo ago
flat-fuchsia

Random issues around importing inside of multiple @tanstack/x packages

Uncaught (in promise) SyntaxError: The requested module 'http://localhost:3000/node_modules/use-sync-external-store/shim/with-selector.js?v=d6fcbb5d' doesn't provide an export named: 'useSyncExternalStoreWithSelector'
Uncaught (in promise) SyntaxError: The requested module 'http://localhost:3000/node_modules/use-sync-external-store/shim/with-selector.js?v=d6fcbb5d' doesn't provide an export named: 'useSyncExternalStoreWithSelector'
22 Replies
flat-fuchsia
flat-fuchsiaOP4mo ago
I don't know how but I got past a previous one that was complaining about react-dom's renderToString not existing.
robust-apricot
robust-apricot4mo ago
can you please provide a complete minimal reproducer project?
flat-fuchsia
flat-fuchsiaOP4mo ago
I can try but I doubt it. I don't think it's a bug, maybe config or something else.
robust-apricot
robust-apricot4mo ago
otherwise we wont be able to help you really
flat-fuchsia
flat-fuchsiaOP4mo ago
Yeah, I getcha. I was hoping for it to be familiar to someone. I'll see what I can do. Thanks
robust-apricot
robust-apricot4mo ago
are you using vite?
flat-fuchsia
flat-fuchsiaOP4mo ago
codesandbox https://codesandbox.io/p/devbox/shy-sun-q7jnhc?workspaceId=ws_8B529M1bsiFQpfmy5tPSje github https://github.com/nvsd/example while doing that I actually got a random warnign that I was using server code in client code.
robust-apricot
robust-apricot4mo ago
so this is a start project? please in future post in #start-questions then
flat-fuchsia
flat-fuchsiaOP4mo ago
Oh yeah, no problem sorry about that. somehow I'm not seeing that. OHHHH
robust-apricot
robust-apricot4mo ago
No description
flat-fuchsia
flat-fuchsiaOP4mo ago
"browse channels"
robust-apricot
robust-apricot4mo ago
yep
flat-fuchsia
flat-fuchsiaOP4mo ago
I can reopen if needed.
robust-apricot
robust-apricot4mo ago
no no
flat-fuchsia
flat-fuchsiaOP4mo ago
I think either loader here https://github.com/nvsd/example/blob/main/src/routes/login/index.tsx or beforeLoad here https://github.com/nvsd/example/blob/main/src/routes/__root.tsx is causing the issues but I haven't been able to test the theory yet as I had to step away but I should be able to test in 30 or so minutes.
robust-apricot
robust-apricot4mo ago
No description
robust-apricot
robust-apricot4mo ago
you cannot use cache outside of RSC
flat-fuchsia
flat-fuchsiaOP4mo ago
You know It's my fault but god lol I'm moving an app from next so that makes sense.
robust-apricot
robust-apricot4mo ago
btw did you see our migration guide?
flat-fuchsia
flat-fuchsiaOP4mo ago
Yeah, I did. Was super helpful. I just didn't think through anything when I moved this folder over. In that same vein: It wasn't perfect but I was able to provide that page as context to an llm and it did a pretty good job on a midsize codebase. Might be some opportunities around that. Just a thought.
robust-apricot
robust-apricot4mo ago
what do you mean?
flat-fuchsia
flat-fuchsiaOP4mo ago
I've seen it before but a "copy prompt" button or something to help with the transition. I basically pulled the page provided that to the llm and then gave it a prompt that was something like "Here's the nextjs documentaion, here's the tanstack docs, here are the differences and away it went. I've also seen getting started prompts and things of that nature.

Did you find this page helpful?