415 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
104
views
Next.js 16 App router internationalization root error
After following the guide on: https://nextjs.org/docs/app/guides/internationalization
The translation logic itself seems to work, but the redirection from the root will never happen.
When visiting ...
0
votes
0
answers
40
views
Handling file uploads in a Next.js App Router backend-only API — Multer doesn’t work, what’s the best approach?
I’m building a backend-only Next.js API project (npx create-next-app@latest --api) that serves a frontend hosted on another platform (React Native, web app, etc.).
I need to handle file uploads (...
Best practices
0
votes
0
replies
46
views
Next JS v16.0.3 TypeScript - The following required properties are missing: fb:app_id at Facebook Debugger
I am trying to develop an app using Next JS v16.0.3 App router TypeScript . Except facebook debugger id that called fb:app_id, all other meta tags are working good.
At inspect element it shows as ...
0
votes
0
answers
46
views
When calling the same server action on the client side, the second request disappears
I have a request which its get wallet details in server action. First request is working properly. But after user changes, I can see log top of it but its not entering server action. For example:
...
1
vote
2
answers
513
views
Next.js 16 Beta: Metadata tags showing up in body instead of head (breaking SEO)
I've been pulling my hair out over this for hours. My metadata is rendering inside the <body> tag instead of the <head> on the server-side HTML, which is completely breaking SEO.
The weird ...
0
votes
1
answer
42
views
Next.js 15 Build Error: Type 'OmitWithTag<{ reportId: string; }, keyof PageProps, "default">' does not satisfy constraint
I'm encountering a TypeScript build error in Next.js 15 with dynamic routes. The error occurs during next build and seems related to the new Async Request API.
.next/types/app/(app)/seo-audit-tool/[...
1
vote
0
answers
70
views
Redirect() fails, returns 200 OK, and causes hydration mismatch
I'm trying to implement a server-side authentication check in a Next.js App Router Layout.tsx and redirect unauthenticated users.
Here is the code for my Layout component:
import { getIronSession } ...
-1
votes
2
answers
77
views
RevalidatePath doesn't Reset The useTransition's pending state
now i have a next.js v15 app and i'm doing some mutation on the server using server action
and here is the code for it
export async function updateGuestAction(formData) {
const session = await auth()...
0
votes
0
answers
141
views
How to force a script into <head> on specific pages?
I need to add the Google Reader Revenue Manager scripts to my article pages in next.js (using the app router). Google's docs are super clear that the scripts have to be in the <head> of the raw ...
0
votes
2
answers
349
views
Issue with Next.js 15.13 with promises and params
Writing a dynamic api route for page that accepts [slug] params.
export async function GET(request: NextRequest, { params }: { params: Promise<{ slug: string}> }) {
const {slug} = await ...
0
votes
0
answers
36
views
How to define a global helper (e.g. getUserFromToken like console.log()) for all Next.js API routes without importing it in every file?
I'm building a Next.js app and I have a helper function called getUserFromToken(token) which extracts and verifies user info from a JWT.
I'd like to use this helper in all my API routes without ...
0
votes
0
answers
96
views
How to create a root-level catch-all dynamic route in Next.js App Router without conflicting with other dynamic or root routes?
I'm building an ecommerce app with Next.js App Router and have these routes:
/users/[id] for user profiles
A root-level catch-all route [...slug] to handle multi-level dynamic paths like:
/...
0
votes
0
answers
56
views
Infinite loop inside the block with console.log("3") in it. redirecting keeps erasing my locales i think
Here's all of my code. It's riddled with comments but aside from that i don't understand how it keeps looping infinitely
next.config.ts:
import type { NextConfig } from "next";
import { ...
3
votes
1
answer
423
views
"Event handlers cannot be passed to Client Component props" even with use client
I’m working on a project using Next.js 13+ with App Router, and I’m trying to pass a onCompose handler to a Sidebar component like this:
<Sidebar onCompose={handleCompose} />
But I keep getting ...
1
vote
0
answers
197
views
How to set meta charset to utf-16 instead of utf-8 in Next.js?
I'm working on a Next.js application (currently using version 15.3.2) and I'm looking to ensure the charset meta tag is correctly set in the HTML head. Typically, in a standard HTML file, I would just ...