All Questions
Tagged with next.js13 nextjs-dynamic-routing
123
questions
0
votes
0
answers
26
views
Cannot import file globals.scss for new layout.tsx
I have a problem when creating a new layout.tsx file in (auth) folder, when I import the globals.scss file I can't apply the styles to the whole web. Please let me know where the issue is. Thanks all.
...
0
votes
0
answers
79
views
Nextjs 14 generateStaticParams doesn't generate files
I'm on NextJS 14 with the App router, and I'm using output: "export" to generate static files for production. I'm using the generateStaticParams function inside /[id]/page.tsx to export ...
0
votes
1
answer
62
views
NextJS app router dynamic routes not working with any named HTTP methods
This is the code placed inside /app/api/password/reset/confirm/[userId]/[idToken].ts.
import { NextRequest, NextResponse } from 'next/server';
// Define and export the GET handler
export const GET = ...
0
votes
0
answers
24
views
Is there any way to share same API response data between "generateMetadata" method and Page Component's method in NextJS 13.5 App Router Page
I have written code similar to this
async function getPostData() {
const res = await fetch('https://api.example.com/post')
if (!res.ok) {
throw new Error('Failed to fetch data')
}
return ...
0
votes
0
answers
62
views
Next.js 14 Supabase Auth: Private Page Access Issue
I followed Supabase's Setting up Server-Side Auth for Next.js guide (https://supabase.com/docs/guides/auth/server-side/nextjs) to set up a basic Next.js application with a user authentication system.
...
0
votes
0
answers
48
views
Infinite loop problem while applying dynamic routing in next js
My project is in next 13 all things was going good until i used dynamic routing(slug) concept for slowing blog section when i am going to any route like localhost:3000/blogs/3
it is showing infinite ...
0
votes
1
answer
46
views
Next.js- dynamic import failed to load the component with a variable as module path
`We need to load the component with dynamic import
for eg: we have hello.js component in "component/shared/hello.js"
and we want to load the "hello" component in login component ...
0
votes
1
answer
72
views
Loading ui is not working for dynamic routes
I am new in nextjs and i am learing the latest version of nextjs which is nextjs 14 with app router and there i am making loading.jsx file in the src/app/loading.jsx like this
export default function ...
0
votes
1
answer
256
views
How to add `not-found` page in different route group level in next js 14
This is my folder structure:
app
├── (app1)
│ └── ekko
│ ├── layout.tsx
│ ├── not-found.tsx
│ └── page.tsx
│
└── (admin)
│ └── admin
│ ├── layout.tsx
│ ├── not-...
0
votes
0
answers
23
views
How to create dynamic link for nextjs
I have an e-commerce website and I want to create a flexible line for the category section. When entering that category, it will only take products from that category.
Example:
When entering the phone ...
0
votes
0
answers
54
views
NextResponse.redirect() not redirecting to the desired route in NextJs Middleware for handling protected routes
import { NextRequest, NextResponse } from "next/server";
export default async function middleware(req: NextRequest) {
const publicPaths = ["/"]; //all public paths
const path =...
1
vote
0
answers
42
views
Is it possible to have a Static route segment in under a Dynamic Segments in NextJs 14
I have Dynamic route segment. I need to have a static segment for each route created for the dynamic routes. here is my expected file structure.
├── app/
│ └── blog/
│ └── [tag]/
│ ├─...
0
votes
0
answers
43
views
how do I send data from my client component to my server side POST route Handler with Next.js app router
I keep getting undefined when I try to destructure the body object from my const { title, body, userId } = request.body;
I have 2 components, a server that post data to an API endpoint and a client ...
1
vote
0
answers
48
views
`UseRouter` Caches the Cookies should I use `redirect`
Login Flow:
Successful login saves a cookie with user information.
I programmatically redirect to the dashboard using router.push('/dashboard'). However, this redirection is unreliable, sometimes ...
0
votes
0
answers
167
views
Next.js: Error EBADF: bad file descriptor error
I have freshly installed Next.js and followed all instructions but it is not working properly. When I try to run my project I get the following error:
node:fs:453
return binding.readFileUtf8(path, ...