skills/claudeception/examples/nextjs-server-side-error-debugging/SKILL.md
Debug getServerSideProps and getStaticProps errors in Next.js. Use when: (1) Page shows 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 not client navigation. Check terminal/server logs instead of browser for actual error messages.
npx skillsauth add aresbit/matebot nextjs-server-side-error-debuggingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Server-side errors in Next.js don't appear in the browser console, making debugging frustrating when you're looking in the wrong place. The browser shows a generic error page or 500 status, but no stack trace or useful error information appears in DevTools.
This skill applies when:
getServerSideProps, getStaticProps, or API routesCommon misleading symptoms:
The actual error with full stack trace appears in the terminal where npm run dev
or next dev is running. This is the first place to look.
# If you don't see the terminal, find the process
ps aux | grep next
# Or restart with visible output
npm run dev
For persistent debugging, wrap server-side code with try-catch:
export async function getServerSideProps(context) {
try {
const data = await fetchSomething();
return { props: { data } };
} catch (error) {
console.error('getServerSideProps error:', error);
// Return error state instead of throwing
return { props: { error: error.message } };
}
}
Check your hosting provider's logs:
After checking the terminal, you should see:
Symptom: User reports page shows "Internal Server Error" after clicking a link.
Investigation:
GET /dashboard → 500npm run dev:Error: Cannot read property 'id' of undefined
at getServerSideProps (/app/pages/dashboard.tsx:15:25)
at renderToHTML (/app/node_modules/next/dist/server/render.js:428:22)
Cause found: Database query returned null instead of user object.
reactStrictMode: true in next.config.js causes double-execution of server
functions in development, which can make debugging confusingnext start (production mode locally), errors may be less verbose;
check NODE_ENV and consider adding custom error loggingdocumentation
Generate and edit Word documents (.docx). Supports professional documents including covers, charts, track-changes editing, and more. Suitable for any .docx creation or modification task.
tools
--- name: discord description: Use when you need to control Discord from OpenClaw via the discord tool: send messages, react, post or upload stickers, upload emojis, run polls, manage threads/pins/search, create/edit/delete channels and categories, fetch permissions or member/role/channel info, or handle moderation actions in Discord DMs or channels. metadata: {"openclaw":{"emoji":"🎮","requires":{"config":["channels.discord"]}}} --- # Discord Actions ## Overview Use `discord` to manage messa
tools
Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.
tools
Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawdhub CLI.