Troubleshooting
Common errors and how to resolve them.
Database Connection Error
Issue: "Authentication failed against database server"
Solution: Verify DATABASE_URL in .env matches your PostgreSQL credentials.
psql "$(grep DATABASE_URL .env | cut -d= -f2-)" -c "SELECT 1;"JWT Session Error
Issue: "JWTSessionError" on login
Solution: Clear browser cookies and ensure AUTH_SECRET is set in .env.
Column Does Not Exist
Issue: "Column 'X' does not exist"
Solution: Run npx prisma db push after git pull (schema changed).
Permission Denied on Upload
Issue: "Unauthorized" on image upload
Solution: Ensure you're logged in as an admin user, then clear browser cookies.
Logs
For detailed logs:
pm2 logs pvd-library --lines 100