286 questions
-2
votes
1
answer
67
views
NextJS Dynamic Routes and Slugs not working on production docker build [closed]
I have a NextJS dynamic route (using app router) which is only breaking when deployed on to production. I think i've tried everything under the sun (regarding the dynamic route config, static props, ...
2
votes
0
answers
42
views
next js dynamic page's dynamic meta not showing up in view source of the page
In my nextjs 15 project with app router. i am trying to add meta details into one of its dynamic route using genrateMetaData function. but somehow its not being rendered in the view source of the page ...
0
votes
0
answers
36
views
After browser back click, showing page content is still from previous route for 4 secs but url is correct. Its happening after upgrading nextjs 15.4.3
Issue Description:
After upgrading Next.js from 15.3.1 to 15.4.3 and sitecore-jss from 22.7.0 to 22.8.0 (as recommended to resolve a critical vulnerability reported by Wiz in the [email protected] ...
0
votes
1
answer
93
views
Getting error while deployment of next js app but it runs locally without error [closed]
I'm deploying a Next.js 15.3.3 app to Vercel and encountering a TypeScript error related to dynamic route parameters. The error says:
"Type '{ params: { questionId: string; questionSlug: string; }...
0
votes
0
answers
70
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
1
answer
474
views
How to use output: 'export' without generateStaticParams() in Next.JS with 'use client';
I am migrating my client-side React website to next.js and want to keep everything as SSG but with next.js file-based routing capabilities.
I have this component on my React website, where I use a ...
0
votes
1
answer
45
views
Optional Router Parameter for NextJS App Router
I am trying to achieve the following routing in this with AppRouter in NextJS.
/company/activity
/company/:cid/activity
I cannot use Optional Catch-all segment, as I will have more pages with same ...
0
votes
1
answer
101
views
Dynamic routing with SSG build in NextJS app router [closed]
I am working on a SSG website using NEXTJS app router.
I have generated a static build (OUT).
I want dynamic path like localhost:3000/username
I created src/app/[username]/page.js and when i enter ...
0
votes
0
answers
153
views
Error "Catch-all must be the last part of the URL" with Parallel Routes and catch-all routes in Next.js
Problem
In Next.js (version 14+), I'm working with Parallel Routes using the @ prefix and catch-all routes [...category]. My file structure is:
app/
[...category]/
@view_category/
...
0
votes
0
answers
25
views
How to set up ISR for dynamic routes in Next.js
interface Post {
id: number;
title: string;
body: string;
userId: number;
tags: string[];
}
async function getPost(id: string) {
const response = await fetch(`https://dummyjson.com/posts/$...
2
votes
2
answers
243
views
How to automatically render nearby not-found.tsx in Next.js 15 App Router without conditional rendering?
I’m using Next.js 15 with the App Router and facing an issue with handling "Not Found" pages in nested routes /dashboard/somerandomtest.
I have a route /dashboard/user, and inside /...
0
votes
0
answers
40
views
Getting 404 Error Despite Correct Folder Structure
I'm learning Next.js and encountered a 404 error when implementing dynamic routing. I've followed the recommended folder structure and ensured my configuration is correct, yet I still face this issue. ...
0
votes
0
answers
27
views
NextJS fast refresh page.tsx on updating server side
I have three files, all in the folder 'test':
actions.ts
page.tsx
Test.tsx
The problem is that upon making a change in test.tsx (client side), I see [Fast Refresh] rebuilding for my page.tsx, and my ...
0
votes
1
answer
32
views
Dynamic getStaticPaths in Next.js SSG for unknown value
I’m working with Next.js Static Site Generation (SSG) and need to generate static paths for a route like /recovery-password/[token]. However, the token value is unknown in advance and changes every ...
0
votes
0
answers
15
views
Nextjs pass big data to dynamic route component
I have component InitiateQuiz where student can choose quiz options like timer, number of questions and topics to be quizzed with, when student clicks on Generate, function handleGenerate will be ...