Overcoming Para integration challenges in TanStack Start applications
Clear cache and node_modules
Reinstall dependencies
Update Para-related packages
Rebuild the project
Environment Variables Not Properly Configured
.env
file:
Node.js Polyfills Missing or Misconfigured
crypto is not defined
or similar issues.Solution: Configure the polyfills specifically for the client bundle only:app.config.ts
to apply polyfills only to the client bundle:
Missing process.browser Configuration
process.browser
definition to help modules determine the execution environment:Styled-Components Errors During Server Rendering
styled.div is not a function
or Cannot read properties of undefined (reading 'div')
during server rendering.Solution: Ensure Para components are only rendered on the client side by using both React.lazy
for dynamic imports and ClientOnly
from TanStack Router:React.lazy
and ClientOnly
ensures that Para components are not only rendered on the client side but also that the modules are not evaluated on the server.Styled-Components Issues Despite ClientOnly Usage
ClientOnly
, you’re still seeing styled-components errors during server rendering.Solution: Module-level evaluation can still happen on the server even if the component isn’t rendered. Make sure all Para imports are lazy loaded:CSS Styling Issues or Transparent Modal
React.lazy
and ClientOnly
for Para components to avoid SSR issues.
routers.client.vite.plugins
config.
process.browser
to true to help modules determine the execution environment.
A detailed description of the problem you’re encountering.
Any relevant error messages or logs.
Steps to reproduce the issue.
Details about your system or environment (e.g., device, operating system, software version).