43,462 questions
0
votes
0
answers
15
views
Next.js call self api , origin is always nothing
Here is my middleware
import { NextResponse, NextRequest } from 'next/server';
import { headers } from 'next/headers'
import { verifyJWT } from '@/lib/jwt';
// In-memory store for rate limiting
...
0
votes
1
answer
14
views
Trying to find the correct maths to increment the values of a game clicker
So I'm coding a clicker (like cookie clicker), but it doesn't increment by seconds, it only increments with a click.
You can buy evolutions for your click, like buying the first adds one to your click....
0
votes
0
answers
9
views
Styling of heroui with nextjs is not working
I am new to nextJS
npx create-next-app@latest
It asked me some question to setup:
So I am not using TypeScript. I allowed to use tailwindcss.
Then npm install and npm run dev was successfully run.
...
0
votes
0
answers
8
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/$...
0
votes
1
answer
32
views
Event Listener Being Added Multiple Times in JavaScript, Causing Performance Issues
I have a problem where an event listener is being added multiple times in my JavaScript code, which is making my app slow.
The Problem
I am adding a dblclick event listener to all elements with the ...
0
votes
1
answer
38
views
How can I insert multiple entries in my database with a single function?
I'm creating a trading card app using Next.js. I want my users to be able to add and remove cards from their collections via forms on the site.
I have a Neon database with three tables: users, cards, ...
1
vote
1
answer
12
views
Why is there no appearance customization option for Stripe's <EmbeddedCheckoutProvider>?
This is my code where I'm using Stripe's embedded component, but I can't see any appearance customization options. Why is that?
<EmbeddedCheckoutProvider
stripe={stripePromise}
options={{
...
-1
votes
0
answers
12
views
How to Add a Video to a Zoom Parallax Effect on Scroll? [closed]
I'm working on a zoom parallax effect similar to this: Zoom Parallax Demo. Now, I want to enhance it by adding a video that extends and zooms as the user scrolls, similar to the effect seen on Topaz ...
0
votes
1
answer
19
views
handel custom JWT build by nodejs(api) in nextjs using authjs(v5)
I return the access token and some user data in the response while setting the refresh token in an HTTP-only cookie on the server when the user logs in.
However, the refresh token is not being set in ...
0
votes
0
answers
9
views
Next.js SSO Integration: Sharing Credentials Across Multiple Applications - Seamless Integration of MSAL and Web SSO
I'm developing a Next.js application named nprj123 that integrates three existing applications. Each of these is accessed via buttons linked to their respective URLs, and they each have their own ...
-3
votes
0
answers
35
views
Reducing the Docker image size of Next.js in a Turborepo
I have set up a Turborepo with a Next.js application (admin-frontend) and three packages:
eslint-config
typescript-config
ui
All three packages are used within the Next.js application.
After ...
0
votes
1
answer
22
views
How can the listing of many repetitive identical height and width class names be shortened?
<Image
src={"/insta.png"}
alt="Instagram"
width={24} height={24}
className="
cursor-pointer
2xl:h-8 2xl:w-8 md:h-6 md:w-6 sm:h-4 sm:w-4
"
/>
...
0
votes
0
answers
14
views
next-auth multiple providers, redirect to specify provider when user access /api/auth/signin
I configured my next-auth to support two Keycloak providers. When accessing /api/auth/signin a screen appears with 2 buttons to access each of the providers, so far so good. But I would like to know ...
0
votes
0
answers
26
views
How to loop through highlighted text of PDF file that is given from backend in ReactJS? [closed]
I want to go through the highlighted text of the PDF file that is given from backend side, when click on the navigation buttons(up & down), now I am trying to implement using react-pdf library but ...
0
votes
1
answer
15
views
Server actions gets called only once when called quickly
I have a client component, and have two aggregation options - daily | weekly
params.aggregation is always an array of single string item (its value is derived from useQueryStates).
When I change the ...
0
votes
0
answers
16
views
How to avoid umping Issue using ShadCN Carousel with Server-Side Pagination NextJS?
I’m using the ShadCN Carousel in my Next.js app and trying to integrate it with server-side paginated API data.
The issue I’m facing is that the scrolling is not smooth—whenever new data is loaded, I ...
-4
votes
0
answers
27
views
How can i setup the security of my website? [closed]
I'm looking for ways to secure my showcase website built with Next.js. Besides the use of a token for API requests, SSL protocol, and HTTPS. I'm not sure what to add. For example, I am fetching some ...
0
votes
1
answer
24
views
my next-auth is not redirecting to /users route after adding prisma adapter, where i have used middleware for protecting route
i am trying to protect /users route with oAuth in next-auth while it's working before adding prisma adapter but after prisma adapter, it's not working as expected as the main issue is: when I go to /...
0
votes
0
answers
10
views
How to capture GIT commit hash in Vercel Build?
Is $VERCEL_GIT_COMMIT_SHA available during a deploy build ?
Problem : My Vercel environment variable (picture ) is unchanged after deploy build
My CLI command :
vercel --prod -m githubDeployment=...
-1
votes
0
answers
26
views
Why am I getting an error with deploying my Next.js app (with a FastAPI microservice)?
This app (built on Next.js) has a folder in root (/), which is a FastAPI microservice and it fails in deployment because of this environment variable issue. What can be done here? The main issue
is ...
0
votes
0
answers
23
views
Nextjs UI is not showing on the browser
browser error image
this is the image of the error that have show in the browser that my nextjs app UI is not showing in the production server on ubuntu instances in EC2 in AWS
when i run the app in ...
-2
votes
1
answer
41
views
How to start a Next.js application from within Visual Studio?
I've been tasked with performing some minor bug fixes to a Next.js application developed by an outside company, but I'm stuck at the very first hurdle - loading the application into Visual Studio and ...
0
votes
0
answers
13
views
In NextJS 15, how do I type an array of type Routes?
TL;DR: Using NextJS's statically typed routes, how can I declare a type-safe array of arbitrary valid Routes?
I have a NextJS project (v15, app router) project with typedRoutes enabled. Suppose this ...
-3
votes
0
answers
12
views
dependency conflict for react-day-picker and date-fns [closed]
npm error node_modules/@radix-ui/react-dropdown-menu
npm error 1 more (@radix-ui/react-popover)
npm error 33 more (@radix-ui/react-arrow, @radix-ui/react-collection, ...)
npm error
npm ...
0
votes
0
answers
19
views
Newly added hospitals or treatments not displaying country in search results [closed]
We are facing an issue where newly added hospitals or treatments updated in Strapi are not displaying their associated country in search results. While hospital names and doctors appear correctly, the ...
0
votes
1
answer
37
views
HTTPS On Frontend and Backend Not Working
I'm trying to test HTTPS on both my frontend and backend environments locally.
On the UI, I'm using Nextjs and am able to easily add HTTPS to my environment using the --experimental-https parameter ...
0
votes
0
answers
33
views
Sanity.io: Unable to resolve image URL from source (undefined)
I was fetching my images in cart page. I wanted just 1 image so my code is below if you guys help me out my pleasure.
import { urlFor } from "@/sanity/lib/image";
import ...
0
votes
0
answers
12
views
iFrame with an animation in a Next.JS app
I am having a little problem in a web app of mine.
And I am hoping someone could give me some relevant advice to solve it.
It has to do with an animation running in an iframe.
When run in the browser ...
0
votes
0
answers
9
views
How to create an advance filter using NextJS Tanstack, and Prisma?
I'm having a hard time on how can I create an advance filter function using Tanstack Query, Next JS and Prisma. The main problem I'm encountering right now is how can I pass the query properly to my ...
0
votes
0
answers
37
views
Django session cookies not persisting
I have a Django API which upon successful login, uses the Set-Cookie Response Headers to set a sessionId and CSRF Token in the cookies. I had it working and all of a sudden it stopped, the cookies no ...
0
votes
1
answer
15
views
NextJS 15.2.2 ChunkLoadError: Loading chunk 2295 failed
I have a production version of nextjs that are runing in standalone mode
I faced the next issue
Uncaught SyntaxError: Unexpected token '<'
ChunkLoadError: Loading chunk 2295 failed.
(missing: ...
-1
votes
1
answer
22
views
Image rendering in NextJs [closed]
I get warning in a console: hook.js:608 Image with src "" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles '...
0
votes
0
answers
21
views
Tailwindcss Processor build failure
I have a React tailwind project with below package.json dependencies and devDependencies, when I run the build script, I ended up with build errors where I tried all options to fix it but cant able to ...
0
votes
1
answer
22
views
React Providers getting unmounted upon user navigation (NextJS 14)
I'm facing a frustrating behavior in my current NextJS 14 project.
Here is the situation:
Upon navigating to the /client/[id]/onboarding route, some providers gets mounted in the app, as they are ...
0
votes
0
answers
23
views
I get sent back to login even if the cookie is being set correctly in next js 15
This problem happen only on production after deploying everything on vercel, I login with gmail, I can see that I'm logged in with my name and image appearing but then fetching some data from mongodb ...
-1
votes
1
answer
34
views
Understanding useEffect() usage in Next.JS Error Handlers
I am looking at examples about error boundaries for Next.JS components in the documentation.
'use client' // Error boundaries must be Client Components
import { useEffect } from 'react'
export ...
0
votes
0
answers
30
views
Calls to QuickPulseService visible in ApplicationInsights
I have set up application insigths in next js application, but for some reason I see a lot of noise, as calls to QuickPulseService are tracked in logs:
This is my setup (simplified for clarity):
...
4
votes
1
answer
29
views
Daisy ui dynamic(come from api) theme color not working
i have a project which is build by nextjs, tailwindcss + daisyui now I want to make the theme color dynamic like my theme colors is come from the API. but its not working I do some configure in my ...
-4
votes
0
answers
47
views
I got this error when i make pnpm build how can i solve it [duplicate]
next build
▲ Next.js 14.2.25
Environments: .env
Creating an optimized production build ...
✓ Compiled successfully
Linting and checking validity of types ..Failed to compile.
./components/HomeCard....
1
vote
2
answers
37
views
how to override parent layout header
I have folder structure as follows:
app
|_layout.tsx
|_feature1
|_page.tsx
|_layout.tsx
|_feature2
|_page.tsx
... (other pages and folder that use main layout as-is)
app/layout:
<HTML><...
0
votes
2
answers
21
views
How to assign search params to current url in middleware if not authorized?
For example, if the user is on the page http://localhost/article/1
Assign ?modal=auth to the current URL
http://localhost/article/1?modal=auth
Here is my middleware. At the moment, if the user is not ...
0
votes
0
answers
40
views
Tailwind CSS Migration: Could not load the configuration file: variants is not a function when using Shadcn
I have Next.js project steup using TailwindCSS and Shadcn, when I am trying to migrate TailwindCSS to the v4 from v3 using the npx @tailwindcss/upgrade, I am getting below error in terminal
...
0
votes
1
answer
28
views
Unable to Access API in Next.js App Router – 404 Not Found
I'm new to Next.js and I'm trying to send an email using an API route, but I'm facing an issue where I cannot access the API.
I have the following structure:
API Route: src/app/api/send-mail/route.ts
...
0
votes
0
answers
12
views
Google Adsense NextJS15 Verification Problem
Can someone explain why I have to use the html head tag and why the NextJS Head Tag is not working?
Do I have to put a footer and all the things that are neccesary to be web conform because I just got ...
0
votes
1
answer
58
views
Missing tailwind.config.js in Latest Tailwind CSS and Next.js Versions - Issues Configuring Hero UI
I'm trying to configure Hero UI (or any component library) with the latest versions of Tailwind CSS and Next.js. However, I'm facing issues because there's no tailwind.config.js file in my project, ...
0
votes
0
answers
20
views
Django + Next cookies not being set when app is hosted
I have a Django app hosted on Google Cloud Run that upon logging in, sets a sessionid and csrftoken in the browser cookies. In my frontend Next app, which I am currently running locally, I redirect to ...
-1
votes
0
answers
24
views
Using Nextjs (latest version) and MUI (latest version) and getting Uncaught Error: Cannot read properties of undefined (reading 'appBar') [closed]
I am trying to figure out the issue as to why I am getting the undefined error below.
Uncaught Error: Cannot read properties of undefined (reading 'appBar')
I'm doing a simple setup for testing ...
0
votes
0
answers
22
views
Hydration errors in next.js
So I am using firebase authentication, and I was getting a hydration error , as I was not handling the "createUserWithEmailAndPassword" and "signInWithEmailAndPassword" async ...
-2
votes
0
answers
22
views
How can we install or use the google translate api into a next.js project? [closed]
Hi im new on the google translate api. i have found information for react applications but due to next.js has the app router things may have a different aproach. i wonder if any one has use the google ...
0
votes
0
answers
16
views
Error signing-up and logging in using firebase authentication
So I am trying to implement a small authentication system in my application using firebase authentication and next.js (using the app router) , but there is an issue I am facing:
So the issue is, that ...