42,131 questions
1
vote
2
answers
117
views
Next.js 15 Pages Router - Dynamic routes showing root page on refresh (static export)
I upgraded an app to NextJS v15 and my dynamic routes are broken after npm run build with output: "export".
When I refresh the browser on a dynamic route like /projects/123, the root page ...
0
votes
1
answer
47
views
Magic login link callback redirect not working
I built a Nextjs project named vocab builder at link https://vocab-builder.app and deployed it on Netlify. My tech stack is Nextjs, Authjs(v5), Resend. I set the login callback redirect to be my home ...
0
votes
0
answers
48
views
Need help updating token in next auth. (next.js app router)
I have a Next.js frontend and NestJS backend.
In the backend there is token generation with refresh token rotation logic, and I want to use the same tokens in the frontend with NextAuth setup.
Here’s ...
1
vote
2
answers
71
views
Can I use the favicon in my website sections such as the navbar in Next.js?
First, I'm new to NextJS. When I try to use the SVG picture I'm using as a favicon in other parts of the website, it doesn't work.
Here's the tree of my directory:
|- components/
| |- Navbar.tsx <-...
0
votes
1
answer
48
views
Dialog closes when parent is rerendered in React/NextJS/Shadcn
I have the following page:
'use client';
import { use } from 'react';
import { useCourseNode } from '@/api/course/hooks';
import { Loader } from '@/components/loaders/loader';
import { ...
2
votes
0
answers
193
views
shadcn/ui Select and Tooltip components always positioning at top-left corner instead of relative to trigger element
I'm using shadcn/ui components in a Next.js 14 project with the app directory structure. All overlay components (Tooltip, Select dropdown, etc.) are appearing at the top-left corner of the screen ...
0
votes
0
answers
92
views
npm run build not working for the specific Next.js project
Creating an optimized production build ...
glob error [Error: EPERM: operation not permitted, scandir 'C:\Users\LENOVO\Application Data'] {
errno: -4048,
code: 'EPERM',
syscall: 'scandir',
...
0
votes
0
answers
36
views
NextJS Image component doesn't display existed images
I've been having this problem for long but haven't figured it out the problem. I confirmed all the images are there in the /public/static/images folder, but NextJS display broken image. I have two ...
0
votes
0
answers
75
views
Custom Toolbar in PayloadCMS RTE
I would need some help regarding creating a custom toolbar for PayloadCMS RTE.
The current version is PayloadCMS 3.49.1, and linked with @payloadcms/richtext-lexical version of 0.28.0.
My goal is to ...
0
votes
0
answers
25
views
FastAPI streaming response getting buffered instead of word by word using fetchEventSource in NextJS 14
I am using fastAPI streaming-response to get the ChatOllama stream. It work well with curl.
But fetching event source from nextjs, feels like rest API, even tho event stream is showing in the network ...
0
votes
1
answer
45
views
Unable to add a custom type to AdapterUser of MongoDBAdapter in "@auth/mongodb-adapter"
I have MongoDBAdapter as the adapter in my next-auth config, and I want to add a role to my user, so for that for that i made a next-auth.d.ts file, but it still shows me the error of type not ...
0
votes
0
answers
43
views
how to fix notion error for page deployment and generation
enter image description here
this big error shows in the webapp all the auth of notion is done and the deploying is working until i have change the response output generation of the gemini function.
...
1
vote
0
answers
121
views
Why does my API call in Next.js return undefined even though the Express backend works fine?
I’m building a small full-stack project using Next.js (frontend) and Express.js (backend) with a MySQL database.
The Express backend has this route:
// server.js
import express from "express&...
0
votes
1
answer
100
views
Preflight Request Failure Handling Axios
When I put rate limiting on my server, and when the rate exceeds, the preflight request fails. So, code execution stops, and the interceptor error is also not shown.
Is there any way to handle it in ...
0
votes
0
answers
97
views
How to share HttpOnly cookie between Laravel API (localhost:8000) and Next.js (localhost:3000)?
I’m building an app where my backend is a Laravel API (running on http://localhost:8000) and my frontend is a Next.js 15 app (running on http://localhost:3000).
I want to store the Sanctum token ...
0
votes
0
answers
37
views
Multiple Next.js Apps - ISR approach
Question regarding ISRs in Next.JS apps.
Basically if we got 2 Next.js apps. 1 app do ISR and output to a storage, and 2nd app refer to App 1 output. Is this possible - 2 apps sharing a single ISR ...
0
votes
0
answers
70
views
How to mask SVG pattern tiles that intersect with text (React/Next.js)
I'm building a hero section (Hero.tsx) in Next.js with a repeating SVG pattern background (pattern-tile.svg) in the form of a 'Ξ'. The layout (hero.layout.module.css) includes large text "MY ...
0
votes
1
answer
51
views
How to focus only Overlay on next.js using aria
I need to focus overlay/dialog when using screen reader.
so I added aria-hidden="true" on main area when open dialog , and added role="dialog" aria-modal="true"
But on ...
0
votes
0
answers
399
views
Next.js - TypeError: Cannot read properties of undefined (reading 'searchParams')
I am trying to get my database connection to run querys but it refuses and runs the error I provided in the title. I didn't change anything and even reverted back a few commits to see what happened ...
0
votes
0
answers
31
views
Fetch / Timeout issue with Cloud Save API Unity and Nextjs 15
I’m building a Next.js route that fetches leaderboard data and then queries the Cloud Save API for each player’s public Email item.
The issue.
TypeError: fetch failed
[cause]: [Error [...
0
votes
0
answers
66
views
Tiptap table's border top sometime missing
Im using tiptap lib. It have table element and I already added border 1px to the th of the border.
.tiptap table td,
.tiptap table th {
border: 1px solid #000;
padding: 0.5em;
box-sizing: border-...
0
votes
0
answers
186
views
Next.js deploying to Cloudflare Workers
want to ask question about opennext.
I have deployed my blog without any issue.
And when i readed documentation i found that worker have assets binding, and when you deploy, its populates with static ...
0
votes
2
answers
125
views
Nextjs with Jest - unexpected token export
I have a Next.js project with TypeScript.
It's a page router instead of an app router
No babel config file(.babelrc etc) in the project
The error occurs when I run npm test. jost seems to be one of ...
0
votes
1
answer
133
views
Getting 404 from Clerk Sign Up or Sign In redirection
I'm using Clerk Sign In and Sign Up components in my Next.js app. When a user signs up for the first time, everything works fine. However, if the user tries to sign up again (for example, using a ...
0
votes
1
answer
118
views
Safari fails to play MP4 video from Strapi backend (works in Chrome, CORS issues)
I’m serving MP4 video files from a Strapi backend, and they play fine in Chrome but fail in Safari.
In Chrome:
The video loads and plays without issues.
In Safari:
I see this error in the console:
...
0
votes
1
answer
86
views
How to reuse a custom InputField component?
I’m migrating my forms in a Next.js 15 project from native form handling to Formik, and I want to reuse my custom form components (InputField, Dropdown, TextArea, etc.).
Here is my current InputField ...
-2
votes
1
answer
119
views
Delay issues with onClick using data from useEffect
I'm making a small flight tracker system and I'm encountering an issue. Here's the code for a "choose your flight" page:
"use client"
interface MyPageProps {
searchParams: ...
0
votes
0
answers
45
views
NextAuth (Auth.js v5 Beta) is building the callbackUrl using localhost:3000 in Production in Next.js v15.5
I have a Next.js v15.5 app directory frontend project with TypeScript and NextAuth v5 Beta. I have enabled the credentials provider from NextAuth, and everything works just fine locally, but in ...
1
vote
2
answers
71
views
Error when updating to Next 15.5.2: Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered
When updating Next.js for applications in my monorepo (turborepo) from version 15.3.3 to 15.5.2 I get the following error:
Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/...
0
votes
0
answers
56
views
Sharing context across apps/packages in Turborepo
My turborepo has several packages, one of which is a ui library that uses some context providers. I export these context providers (Theme, Toast, etc.) so that I can use my UI components in my apps ...
0
votes
0
answers
83
views
How does authjs (next-auth) store session data?
I used next-auth@beta in my Next project.
I also used credential provider to perform authentication against my database where it stores all the users in a MySQL table. Some basic information such as ...
0
votes
0
answers
25
views
Not able to get the tailwind classes suggestions in with tailwind v4 as there is not config file
I have just setup the next js project with typescript and tailwind. i wanted to apply the theme and got to know that, now on words tailwind v4, we will not have tailwind.config.ts file.
**but ...
0
votes
0
answers
29
views
What is wrong with this gasp animation code
I'm trying to create a vertical scroll animation with gsap but i seem to be having problems with the code. It is scrolling horizontally like i want it to but it only takes a second, which is too fast. ...
3
votes
2
answers
408
views
"TypeError: Cannot read properties of undefined (reading 'traits')" When using Zod to validate incoming data [closed]
I'm currently trying to validate a JSON object coming from a database into my web app, and I keep getting the error message: TypeError: Cannot read properties of undefined (reading 'traits'). There ...
1
vote
0
answers
65
views
Not Able to update Single Type in Strapi
I have created a single type in my strapi named "LibraryConfig".
When I am trying to update the data in this single type using api, so the response is successfull but when I see the strapi ...
0
votes
0
answers
96
views
40% of Firebase User Registrations Missing Firestore Documents
I'm experiencing a critical issue with my NextJS/Firebase application where approximately 40% of random user registrations result in "orphaned" users - users that exist in Firebase ...
1
vote
1
answer
149
views
How to configure NextJS 14 for debugging with VSCode and alternative Chrome profile?
Basics:
NextJS 14.2.16
Pages Router
VSCode IDE (latest version)
Flask is the backend, NextJS is only used to serve a React front-end.
Goal:
Debug web app with Chrome using a user profile that has ...
1
vote
0
answers
181
views
Tailwind CSS IntelliSense doesn't work in a new Next.js project
Tailwind CSS IntelliSense doesn't work in a new Next.js project unless I add tailwind.config.ts
I created a new Next.js project, and Tailwind CSS (v4) was installed by default. However, in my editor (...
1
vote
0
answers
63
views
Nextjs image loses sharpness when reduced in width and height
i have an image for logo that is 1203 x 885, the more i reduce the width and height the more the logo loses sharpness, quality doesn't seem to do anything, the image looks vertically squeezed, the ...
0
votes
0
answers
37
views
Using Django jwt tokens with Nextjs with cookies
My backend has an endpoint: /auth/jwt/create that returns a JSON response containing the access and refresh tokens. With my current backend setup, I send the tokens in both the response body and in ...
0
votes
0
answers
58
views
Jest coverage shows different results when running single test file vs all tests
I'm experiencing frustrating Jest coverage inconsistencies in my React project. When I run tests for individual files in isolation, I get perfect 100% coverage as expected. However, when I run the ...
0
votes
0
answers
30
views
T3 Stack Page Routing Boilerplate does not work
I am trying to create an app using the T3 stack. I am following the instructions in the T3 documentation which start by telling us to use the command npm create t3-app@latest. After doing that, we get ...
0
votes
0
answers
64
views
Global.CSS issue with TailwindCSS and PostCSS in Turborepo Monorepo
I am new to setting up a monorepo solution as I've only worked with a regular next app in the past. For my current project, I have 2 deliverables and I am trying to share resources and components ...
0
votes
1
answer
167
views
How can I remove the Error Overlay that obstructs Playwright E2E test assertions
I’m running Playwright E2E tests against a Next.js 15 project. When something goes wrong in dev, Next injects an error overlay (via the element) (see image as an example). That overlay is useful in ...
1
vote
0
answers
40
views
How to setup .npmrc file in Next.js application that is dependent on an authtoken?
I have a Next.js application that is dependent on a npm package that uses an authentication token. I don't want to commit this token to source control.
I created a .env file in the root of my ...
0
votes
0
answers
80
views
Next.js hydration mismatch due to unstable id field rendering differently on the server vs client
I'm using Next.js with a Catalyst Sidebar component, like so:
my-project/src/app/
(dashboard)
(organization)/organizations/[organizationId]/
layout.tsx
Sidebar.tsx
layout.tsx
// ...
0
votes
2
answers
76
views
Rerouting to new page with parameters and fetching from API results in API fetch loop
I made a search panel component, searchPanel.tsx. On it, a button grabs the details from the form (Flight From, Flight To, Flight Date, and some other data), then sends that to a new page.
Here's the ...
0
votes
1
answer
87
views
Authentication of Api routes in Nextjs and Supabase
I've a nexjs app using supabse for auth
In that app all the api routes are protected as they should be
Now I want a frontend component of my app to send a request to an endpoint by the api route
But ...
1
vote
1
answer
279
views
FastAPI route works locally with `/` but not on Vercel (and vice versa)
I have a FastAPI + Next.js project deployed on Vercel.
Locally everything works, but on Vercel some routes break depending on whether I use a trailing slash in the route definition.
For example, in my ...
0
votes
0
answers
65
views
Why there are two SignalR connections created after page refresh?
I've set up SignalR with Next.js 15 to stream real-time data. Everything works fine, but when I refresh the page (Ctrl + R), I notice two SignalR connections being opened.
I already have ...