Appearance
Troubleshooting
Common issues and their solutions.
Widget Issues
Widget Not Appearing
Symptoms: The Carla widget doesn't show up on your site.
Solutions:
Check API key:
bash# Verify it's set echo $NEXT_PUBLIC_CARLA_API_KEYRestart dev server:
bash# Environment variables require restart npm run devCheck browser console:
- Look for script loading errors
- Check network tab for failed requests
Verify widget component:
- Check it's imported in your layout/
_app - Ensure component is rendering (add console.log)
- Check it's imported in your layout/
Widget Loads But Doesn't Work
Symptoms: Widget appears but can't connect or respond.
Solutions:
Verify API key is valid:
- Go to interworky.com
- Check Integrations page
- Generate new key if needed
Check network connectivity:
- Open browser DevTools Network tab
- Look for failed WebSocket connections
- Check for CORS errors
Clear browser cache:
bash# Hard refresh Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
Scanning Issues
No Routes Found
Symptoms: scan command finds 0 routes.
Solutions:
Check API directory:
bash# Verify the path npx @interworky/carla-nextjs scan --path ./app/apiVerify file structure:
app/api/ └── route.ts # ✓ Correct app/api/ └── handler.ts # ✗ Wrong - must be route.tsCheck file exports:
typescript// ✓ Correct export async function GET() {} // ✗ Wrong const handler = async () => {}; export default handler;
Incomplete Tool Definitions
Symptoms: Tools generated but missing parameters or types.
Solutions:
Add TypeScript types:
typescript// Better type inference export async function POST(request: Request) { const body: { name: string; email: string } = await request.json(); // ... }Run fix command:
bashnpx @interworky/carla-nextjs fixManual editing:
- Edit
.carla/tools.json - Add missing descriptions and types
- Run sync again
- Edit
Sync Issues
Sync Fails
Symptoms: sync command fails with error.
Solutions:
Check API key:
bash# Verify it's set correctly grep CARLA_API_KEY .env.localCheck network:
bash# Test connectivity curl https://api.interworky.com/healthVerbose output:
bash# See detailed error npx @interworky/carla-nextjs sync --verboseCheck rate limits:
- Wait a few minutes
- Try again
Tools Not Updating
Symptoms: Changes don't appear in Interworky dashboard.
Solutions:
Force rescan:
bashnpx @interworky/carla-nextjs scan --force npx @interworky/carla-nextjs syncCheck enabled status:
json{ "name": "my_tool", "enabled": true // Must be true }Clear cache:
bashrm -rf .carla/ npx @interworky/carla-nextjs scan npx @interworky/carla-nextjs sync
Build Issues
TypeScript Errors
Symptoms: Build fails with type errors.
Solutions:
Update types:
bashnpm install -D @types/node@latestCheck tsconfig.json:
json{ "compilerOptions": { "moduleResolution": "bundler", "module": "ESNext" } }Ignore if needed:
typescript// @ts-ignore
Build Size Too Large
Symptoms: Bundle size increased significantly.
Solutions:
Check widget loading:
typescript// Widget should load async useEffect(() => { setTimeout(() => { // Load script }, 1500); }, []);Verify imports:
- Don't import Carla CLI in frontend
- Keep widget component minimal
Performance Issues
Slow API Responses
Symptoms: Carla responses are slow.
Solutions:
Check API performance:
typescriptexport async function GET() { const start = Date.now(); const data = await getData(); console.log(`Took ${Date.now() - start}ms`); return Response.json(data); }Add caching:
typescriptexport const revalidate = 60; // Cache for 60sOptimize queries:
- Add database indexes
- Reduce data returned
- Use pagination
High Memory Usage
Symptoms: Node process uses too much memory.
Solutions:
Limit scan scope:
bash# Only scan necessary routes npx @interworky/carla-nextjs scan --path ./app/api/publicClear old data:
bashrm -rf .carla/debug.json
Common Errors
ENOENT: no such file or directory
Cause: File or directory doesn't exist.
Solution:
bash
# Make sure you're in the project root
pwd
# Check if package.json exists
ls package.jsonCannot find module
Cause: Missing dependency.
Solution:
bash
npm installInvalid API key
Cause: API key is wrong or expired.
Solution:
- Go to interworky.com
- Navigate to Integrations
- Generate new API key
- Update
.env.local
Permission denied
Cause: No write permissions.
Solution:
bash
# On Linux/Mac
chmod +w .carla/
# Or run with sudo (not recommended)
sudo npx @interworky/carla-nextjs scanGetting Help
If you're still stuck:
Check Documentation:
Search Issues:
- GitHub Issues
- Someone may have had the same problem
Ask for Help:
Report a Bug:
- Create an Issue
- Include error messages and reproduction steps
Debug Mode
Enable debug mode for more information:
bash
# Set debug env var
DEBUG=carla:* npx @interworky/carla-nextjs scan
# Or check debug.json
cat .carla/debug.jsonThis will provide detailed logs to help diagnose issues.