Troubleshooting
Common issues encountered when developing or deploying CommonPlace.
Development Issues
"Supabase connection failed"
Cause: Invalid or missing environment variables.
Solution:
- Check
.envfile exists - Verify
VITE_SUPABASE_URLis correct - Verify
VITE_SUPABASE_ANON_KEYis correct - Restart dev server after changes
"Module not found"
Cause: Dependencies not installed.
Solution:
rm -rf node_modules
npm install
"Port already in use"
Cause: Another process is using port 5173.
Solution:
# Find the process
lsof -i :5173
# Kill it
kill -9 <PID>
# Or use a different port
npm run dev -- --port 3000
"RLS policy error"
Cause: Row Level Security blocking query.
Solution:
- Check you're authenticated
- Verify the RLS policy allows your action
- Check the
auth.uid()matches expected user
Build Issues
"Failed to resolve import"
Cause: Missing or incorrect import path.
Solution:
- Check the file exists
- Verify the export name
- Check for typos in the path
"TypeScript errors"
Cause: Type mismatches.
Solution:
- Run
npm run typecheck - Fix reported errors
- Use
// @ts-ignoresparingly
Database Issues
"Permission denied"
Cause: RLS policy blocking access.
Solution:
- Check you're signed in
- Verify the policy exists
- Test in SQL Editor with
auth.uid()set
"Duplicate key"
Cause: Unique constraint violation.
Solution:
- Check if record already exists
- Use
UPSERTif appropriate - Handle conflict in application code
Deployment Issues
"Build failed on Netlify"
Cause: Build configuration issue.
Solution:
- Check
netlify.tomlis correct - Verify Node version
- Check build logs for specific error
"404 on refresh"
Cause: Client-side routing not configured.
Solution:
Ensure _redirects or netlify.toml has:
/* /index.html 200
Last updated: 2026-02-07