TanStack Start’s server-side rendering (SSR) capabilities can introduce unique challenges when integrating Para SDK. This guide addresses frequent issues and offers tailored solutions to ensure a successful implementation.Documentation Index
Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
Use this file to discover all available pages before exploring further.
General Troubleshooting Steps
Before diving into specific issues, try these general troubleshooting steps:Clear cache and node_modules
Clear cache and node_modules
Reinstall dependencies
Reinstall dependencies
Update Para-related packages
Update Para-related packages
Rebuild the project
Rebuild the project
Common Issues and Solutions
Environment Variables Not Properly Configured
Environment Variables Not Properly Configured
-
In your
.envfile: -
In your constants file:
-
When using these in your ParaProvider:
Node.js Polyfills Missing or Misconfigured
Node.js Polyfills Missing or Misconfigured
crypto is not defined or similar issues.Solution: Configure the polyfills specifically for the client bundle only:-
Install the plugin:
-
Update your
app.config.tsto apply polyfills only to the client bundle:
Missing process.browser Configuration
Missing process.browser Configuration
process.browser definition to help modules determine the execution environment:Styled-Components Errors During Server Rendering
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
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:-
Don’t import directly from Para SDK at the module level:
-
Instead, create wrapper components for all Para components:
-
Then lazy load these wrapper components:
CSS Styling Issues or Transparent Modal
CSS Styling Issues or Transparent Modal
Duplicate ParaModal Instances
Duplicate ParaModal Instances
<ParaProvider> and also renders a separate <ParaModal />. ParaProvider includes its own embedded modal by default, so the two modal instances can compete for the same Para state and cause inconsistent open, close, or authentication behavior.Solution: Prefer the embedded modal and remove the separate <ParaModal />. Pass modal options to ParaProvider with paraModalConfig:<ParaModal />, disable the provider’s embedded modal:Wagmi v3 Module Resolution Errors
Wagmi v3 Module Resolution Errors
Best Practices for TanStack Start Integration
-
Client-Side Only Rendering: Always use both
React.lazyandClientOnlyfor Para components to avoid SSR issues. -
Polyfill Strategy: Configure node polyfills only for the client bundle using the
routers.client.vite.pluginsconfig. -
Environment Awareness: Set
process.browserto true to help modules determine the execution environment. - Component Boundaries: Clearly define boundaries between server and client components to prevent hydration mismatches.
- Error Handling: Implement error boundaries to gracefully handle any runtime errors related to Para integration.
- Development vs Production: Use environment-specific configurations to manage different settings for development and production builds.
Integration Support
If you’re experiencing issues that aren’t resolved by our troubleshooting resources, please contact our team for assistance. To help us resolve your issue quickly, please include the following information in your request:- 1
A detailed description of the problem you’re encountering.
- 2
Any relevant error messages or logs.
- 3
Steps to reproduce the issue.
- 4
Details about your system or environment (e.g., device, operating system, software version).