Using an LLM (ChatGPT, Claude) or Coding Assistant (Cursor, Github Copilot)? Here are a few tips:
- Include the Para LLM-optimized context file for the most up-to-date help
- Check out the Example Hub Wiki for an interactive LLM using Para Examples Hub
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
Problem: Para API key environment variables not being recognized in your application.Solution: Ensure you’re using the correct prefix for environment variables in TanStack Start and accessing them properly:
-
In your
.env
file: -
In your constants file:
-
When using these in your ParaProvider:
Node.js Polyfills Missing or Misconfigured
Node.js Polyfills Missing or Misconfigured
Problem: Missing or improperly configured Node.js polyfills causing errors like
crypto is not defined
or similar issues.Solution: Configure the polyfills specifically for the client bundle only:-
Install the plugin:
-
Update your
app.config.ts
to apply polyfills only to the client bundle:
Missing process.browser Configuration
Missing process.browser Configuration
Problem: Browser-specific modules not being resolved correctly, leading to missing APIs or incorrect environment detection.Solution: Add the This setting is critical for ensuring that browser-specific code paths are correctly resolved during bundling.
process.browser
definition to help modules determine the execution environment:Styled-Components Errors During Server Rendering
Styled-Components Errors During Server Rendering
Problem: Errors like The combination of
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
Problem: Even with
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
Problem: The Para modal appears transparent or without proper styling.Solution: Import Para’s CSS file in your component:Ensure this import is included in the component that uses Para components or in a parent component that wraps them.
Best Practices for TanStack Start Integration
-
Client-Side Only Rendering: Always use both
React.lazy
andClientOnly
for Para components to avoid SSR issues. -
Polyfill Strategy: Configure node polyfills only for the client bundle using the
routers.client.vite.plugins
config. -
Environment Awareness: Set
process.browser
to 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).