Skip to main content

All 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. ...
Duy Hung's user avatar
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 ...
Rom-888's user avatar
  • 876
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 = ...
Muhammad Anas's user avatar
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 ...
Mankesh's user avatar
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. ...
Mehdi Saqlen's user avatar
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 ...
Harsh Soni _21's user avatar
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 ...
Gusz's user avatar
  • 1
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 ...
Vishal Kumar's user avatar
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-...
Mohsin Hassan's user avatar
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 ...
namnt's user avatar
  • 57
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 =...
Hardik Choudhary's user avatar
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]/ │ ├─...
Nesar Ahmed's user avatar
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 ...
fibonacci001's user avatar
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 ...
Mustafa Walid Marzouk Mohamed 's user avatar
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, ...
Vaibhav Jadhav's user avatar

15 30 50 per page
1
2 3 4 5
9