Troubleshooting guides by topic
Next.js, React and TypeScript
Client/server rendering, components, hooks, TypeScript and build errors.
70 English guides in this category
New article does not go to sitemap.xml in Next.js
How to find an error in generating sitemap Next.js and make sure that new addresses are visible to robots.
Read the solutionNext.js — 'Hydration failed' due to differences in date and time zone
Description of the diagnosis and repair of the Hydration failed error in Next.js, when different representations of the date/time zone between the server and the client cause a discrepancy of the DOM tree and the hydratation errors.
Read the solutionNext.js 15: reading params.slug without await generates an error
After the Next.js update, the dynamic route begins to report that the params should be read asynchronously.
Read the solutionNext.js API endpoint returns 405 for OPTIONS method
The app tries to send a request from another domain, but endpoint corresponds to Method Not Allowed during preflight.
Read the solutionNext.js Image fill without sizes fetches too large file
On the phone, the graphics take a small portion of the screen, but the browser downloads a wide image for desktop.
Read the solutionNext.js Image returns 400 despite the correct image
The normal image URL works, but the / next/image request ends with HTTP 400.
Read the solutionNext.js Image: hostname is not configured under images — repair
Next/image rejects a photo from an outside host? Configure remotePatterns without opening the optimizer to all domains.
Read the solutionNext.js Link: href is required when rendering the list
The list of guides works for some of the records, but the render of one item with Link ends up with an error of missing href.
Read the solutionNext.js Middleware creates a redirect loop on /login
The browser informs about too many redirections and the login route does not open.
Read the solutionNext.js next/font: Failed to fetch Google Fonts during build
The implementation interrupts the compilation when downloading fonts by next/font/google.
Read the solutionNext.js notFound() ends as a 500 error after an exception has been caught
The non-existent article should return 404, but the catch turns the internal notFound() into a simple application error.
Read the solutionNext.js opengraph-image generates 500 when sharing a link
The page opens normally, but endpoint /opengraph-image returns 500 and the thumbnail in the communicator does not work.
Read the solutionNext.js parallel routes: After refresh the modal turns into 404
The navigation in the app opens modal, but a direct refresh of the current URL shows no matching of the parallel route.
Read the solutionNext.js revalidatePath Does Not Refresh a Specific Page
After performing the revalidatePath action, the user still sees a buffered version of the order details.
Read the solutionNext.js Route Handler GET returns old JSON after upgrade
After changing the configuration endpoint /api/config shows the previous values, although the database has new data.
Read the solutionNext.js Route Handler: Body is unusable at second read request.json()
Endpoint returns Body is unusable or stream already read when trying to reread POST data.
Read the solutionNext.js router.refresh() does not refresh data from the list
After saving the router.refresh record, it does not show a new value despite the completed POST.
Read the solutionNext.js Server Action rejects larger form or attachment
A small form works and sending more fields or a file ends in a request size limit error.
Read the solutionNext.js Server Action: Origin Mismatch Error
Writing through the form does not work only behind reverse proxy or custom domain and a message about origin mismatch appears.
Read the solutionNext.js shows old data despite updating in the database — cache
Old content in Next.js App Router? How to distinguish cache, static rendering and API problem.
Read the solutionNext.js sitemap contains preview addresses instead of production domain
Sitemap XML works, but its loc elements indicate the temporary domain of deploya Vercel.
Read the solutionNext.js Static Export: Dynamic Route Missing generateStaticParams
Output project: export is built until it passes through the dynamic route and reports missing generationStaticParams.
Read the solutionNext.js trailingSlash Causes a Redirect Loop
Request /offer passes through another 308 and returns to the previous address.
Read the solutionNext.js: Content Security Policy blocks application scripts
The browser shows Refused to execute inline script and part of the interaction does not work after sharpening CSP.
Read the solution