Troubleshooting Guide
This document covers common issues, errors, and their solutions when working at Innox Technologies
Table of Contents
Development Issues
Build Errors
TypeScript Errors
Chakra UI v3 Issues
Authentication Issues
Performance Issues
Deployment Issues
Getting Help
Development Issues
Issue: "Module not found: Can't resolve '@/components/...'"
Symptoms:
Import errors for components
TypeScript errors even though files exist
Build fails with module resolution errors
Solutions:
Check tsconfig.json paths:
Restart TypeScript Server:
VS Code: Command Palette → "TypeScript: Restart TS Server"
Or restart VS Code entirely
Clean and reinstall:
Issue: Changes not reflecting in dev server
Symptoms:
Code changes don't appear in browser
Hard refresh doesn't work
Old code still running
Solutions:
Restart dev server:
Clear .next cache:
Check for turbopack issues:
Issue: Port 3000 already in use
Symptoms:
Solutions:
Kill process on port 3000:
Use different port:
Build Errors
Issue: "ReferenceError: document is not defined"
Symptoms:
Build fails with document/window undefined
Error during server-side rendering
Cause: Using browser APIs in Server Component
Solution:
Issue: "Server actions cannot be used in Client Components"
Symptoms:
Solution:
Issue: "Module not found: Package subpaths not defined"
Symptoms:
Solution: Check Next.js version and package.json exports
TypeScript Errors
Issue: "Property 'X' does not exist on type 'Y'"
Symptoms:
TypeScript errors on Chakra UI components
Type mismatches
Solution for Chakra UI v3:
Issue: "Type 'X' is not assignable to type 'Y'"
Symptoms:
Type errors on props
Variant/colorPalette errors
Solution:
Issue: "Cannot find module 'next-auth'"
Symptoms:
Import errors for next-auth
Type errors
Solution:
Chakra UI v3 Issues
Issue: "Property 'Provider' does not exist"
Symptoms:
Cause: Chakra UI v3 has different exports
Solution:
Issue: "Property 'Avatar' does not exist"
Symptoms:
Avatar component not found
Switch component not found
Cause: These components don't exist in Chakra UI v3
Solution:
Issue: "Property 'bgPalette' does not exist"
Symptoms:
Props like
bgPalettenot recognizedfallbackSrcnot working
Solution:
Issue: How to check available Chakra v3 exports
Solution:
Authentication Issues
Issue: "Invalid next-auth config"
Symptoms:
Auth not working
Login fails silently
Solutions:
Check environment variables:
Generate NEXTAUTH_SECRET:
Check auth config:
Issue: "Session is always null"
Symptoms:
Session undefined in Server Components
useSessionreturns null
Solutions:
Check middleware:
Check session usage:
Issue: "Redirect not working after logout"
Symptoms:
Stays on same page after logout
Doesn't redirect to login
Solution:
Issue: "JWT token not including role"
Symptoms:
Session doesn't have user role
Role checks fail
Solution:
Performance Issues
Issue: Slow initial page load
Diagnosis:
Solutions:
Use Server Components by default
Lazy load heavy components:
Optimize images:
Issue: Too many Client Components
Symptoms:
Large JavaScript bundle
Slow client-side hydration
Solution:
Issue: Slow Server Actions
Diagnosis:
Solutions:
Parallelize independent operations:
Add database indexes (when using DB)
Cache results where appropriate
Deployment Issues
Issue: Build fails on Vercel
Symptoms:
Works locally, fails on Vercel
Type errors in production build
Solutions:
Check TypeScript version:
Ensure all env vars are set:
Go to Vercel project settings
Add NEXTAUTH_URL and NEXTAUTH_SECRET
Check build logs:
Issue: "NEXTAUTH_URL mismatch"
Symptoms:
Auth fails in production
Redirect loops
Solution:
Issue: Static generation fails
Symptoms:
Pages not generating statically
Build timeout
Solution:
Debugging Tips
Enable Debug Mode
NextAuth:
Next.js:
Check Server Action Logs
Network Tab
Open Chrome DevTools
Go to Network tab
Filter by "fetch"
Look for Server Action calls
Check request/response payloads
React DevTools
Install React DevTools extension
Check component props
Look for unnecessary re-renders
Verify Server vs Client Components
Common Mistakes
1. Forgetting "use client"
2. Using fetch in Server Components
3. Not handling ActionResult
4. Hardcoding colors
Getting Help
1. Check Documentation
ONBOARDING.md - Setup and development
ARCHITECTURE.md - System design
CODE_PATTERNS.md - Coding conventions
2. Search Existing Issues
Before creating new issues, search:
GitHub issues
Internal documentation
Stack Overflow
3. Debug Steps
Reproduce the issue consistently
Isolate the problem - create minimal reproduction
Check console logs - browser and terminal
Check network tab - failed requests
Try clean build:
4. Ask for Help
When asking for help, provide:
What you tried: Steps you took
Expected behavior: What should happen
Actual behavior: What actually happened
Error messages: Full error stack traces
Environment: Node version, OS, browser
Code sample: Minimal reproduction
5. Create Issue
Include in your issue:
Clear title
Description
Steps to reproduce
Expected vs actual behavior
Screenshots (if applicable)
Code snippets
Environment details
Quick Reference
Reset Everything
Check Versions
Useful Commands
Environment Check
Still stuck? Reach out to the team or create an issue with details about your problem.
Last updated
