TanStackT
TanStack2mo ago
1 reply
sacred-rose

context provider + hook works in dev, not when built

I have a context provider and a hook that uses stuff from the context. it throws the typical error if it's being used while not in the provider. problem I'm having is that it works fine in dev, but when I build my app and run it with node (node .output/server/index.mjs) then it throws an error that it's not being used in the provider when it definitely is? I'm using spa mode, still on nitro v2 plugin since with the v3 is broken with spa mode (https://github.com/TanStack/router/issues/5967). any idea what is going on here?
GitHub
🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more). - TanStack/router
TanStack/router
Was this page helpful?