nextjs-server-side-error-debugging

Trace Next.js server-side errors in getServerSideProps and getStaticProps to surface root causes.

35|222|Updated Jan 18, 2026
One-click install
npx skills add https://github.com/AlexMikhalev/claude-code-continuous-learning-skill --skill nextjs-server-side-error-debugging-alexmikhalev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-server-side-error-debugging
Source: https://github.com/AlexMikhalev/claude-code-continuous-learning-skill/tree/main/examples/nextjs-server-side-error-debugging
Command: npx skills add https://github.com/AlexMikhalev/claude-code-continuous-learning-skill --skill nextjs-server-side-error-debugging-alexmikhalev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Debug getServerSideProps and getStaticProps errors in Next.js. Use when: (1) Page shows a generic error but browser console is empty, (2) API routes return 500 with no details, (3) Server-side code fails silently, (4) Error only occurs on refresh or direct navigation. Check terminal and server logs for the actual error messages.

Core Features & Use Cases

  • Guided diagnosis of Next.js server-side failures by examining terminal logs and server output to surface full stack traces and root causes for getServerSideProps, getStaticProps, and API routes.
  • Handles common failure modes including generic error pages, silent server errors, and issues that only appear on page reload, with a repeatable troubleshooting workflow.
  • Provides actionable fixes with concrete code adjustments, logging enhancements, and verification steps to validate the resolution.

Quick Start

Run your Next.js dev server and follow the terminal-guided debugging workflow to reproduce and fix the issue.

Frequently Asked Questions about nextjs-server-side-error-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug Next.js server-side errors in getServerSideProps?

Debug Next.js server-side errors by running the dev server and checking terminal logs to surface full stack traces from getServerSideProps. This traces silent failures and identifies the root cause of generic error pages appearing during direct navigation or page refreshes.

Why does my Next.js page return a 500 error on refresh but work on client navigation?

A 500 error on refresh happens when server-side code fails silently during server rendering. Examine terminal logs and server output to find the hidden stack trace, because browser consoles remain empty during server-side rendering execution failures.

How do I fix API routes returning 500 with no details in Next.js?

Fix API routes returning 500 by tracing server-side code execution through terminal logs rather than the browser. The workflow surfaces full stack traces and provides concrete code adjustments, logging enhancements, and verification steps to resolve silent failures.

What is the best way to trace silent failures in getStaticProps?

Trace silent getStaticProps failures by monitoring terminal logs during build or dev processes. This captures full stack traces and root causes invisible in the browser, guiding concrete code changes and verification checks to resolve the issue.

How do I add logging to Next.js server-side rendering to diagnose errors?

Add logging to Next.js server-side rendering by applying recommended code changes that capture environment considerations and stack traces. The workflow enhances logging within getServerSideProps and API routes to verify the resolution of silent server failures.