- Fix Next.js Static Export URLs Returning 404 on Refresh· 4 min read
Next.js static export pages 404 on refresh because /about is saved as about.html. Fix it with trailingSlash: true or an nginx try_files rule on your own server.
- Fix @tailwindcss/oxide Native Binding Error in pnpm Workspace with Next.js· 4 min read
Getting 'Cannot find native binding' for @tailwindcss/oxide in a pnpm workspace with Next.js Turbopack? Here's why it happens and how to fix it.
- Testing Next.js Image Component· 3 min read
Test the Next.js Image component in Jest by mocking next/image as a plain img tag, then assert alt text and src. Includes a component test and common mistakes.
- Comprehensive Guide: Mocking Next.js useRouter with Jest for Effective Testing· 2 min read
Mock Next.js useRouter in Jest to control pathname and query and assert router.push, with a dynamic route example and the App Router next/navigation variant.