43,484 questions
-1
votes
0
answers
11
views
How can I disable ESLint when deploying Next.js in Vercel?
I've been trying to deploy my website in Vercel, but I use any sometimes in my code. I know that disabling ESLint is not a good, but currently I need to deploy the website for initial output. I tried ...
0
votes
0
answers
17
views
The id provided does not exist razorpay in nextjs/nodejs
I'm creating an order from the frontend, and the backend sends me the subscription ID for the user. When I open the Razorpay payment popup, it sometimes shows the error: "The id provided does not ...
0
votes
0
answers
12
views
Nextjs middleware is not able to read cookies, when deployed on Firebase hosting
I have a Nextjs 15.1.3 website that works well in development mode (locally). However, when deployed to Firebase hosting, I am no longer able to read cookies in the middleware.
Here is what I am ...
0
votes
0
answers
10
views
Ensure Private Key Environment Variables NextJS are private next.config.js
I'm implementing a "Contact Us" email functionality where I need environment variables for sensitive information such as a username and password for email authentication PRIVATE_KEY and a ...
0
votes
0
answers
28
views
Fetching data with axios/server actions/authentication cookies
I have a REST API/Express + NodeJS (backend) and a Client Site/NextJS(frontend) and the authentication between them is done through JWT.
My REST API returns accessToken and refreshToken through ...
0
votes
1
answer
14
views
How to read environment variables server-side in NextJS
Using NextJS v14 with the app router paradigm. I have tried two different high-level approaches to reading environment variables in server-side code, and neither worked. How can I achieve this without ...
0
votes
0
answers
9
views
Out-Of-Range value for MUI select with dependent select values
I'm currently running into this issue where where I have one select field that is dependent on the other one.
MUI: You have provided an out-of-range value `1` for the select component.
Consider ...
0
votes
1
answer
33
views
Why send formData to a server action on form submission?
I am using NextJS app router and shadcn/ui(uses react-hook-form and zod).
In all the code examples I have seen, the form action receives formData. but in my experience, the formData might not always ...
0
votes
1
answer
19
views
Flutter & Next.js React Communication - Firebase ID Token Immediately “Invalid or Expired” in Next.js/Node Despite Being Fresh
I have a Flutter app that signs users in with Firebase Auth. Right after sign-in, I call:
final user = FirebaseAuth.instance.currentUser;
final idToken = await user?.getIdToken();
Then I send that ...
0
votes
0
answers
16
views
uncaughtException: RangeError: Array buffer allocation failed Next.js
I got an error:
RangeError: Array buffer allocation failed
at new ArrayBuffer (<anonymous>)
at new Uint8Array (<anonymous>)
⨯ uncaughtException: RangeError: Array buffer ...
0
votes
0
answers
21
views
How to handle and display server errors on the client in Next.js
I am new with Next.js. I have a login form that contains user and password. I would like to display an error (under the input) from server to client in Next.js when credentials are invalid.
I tried ...
2
votes
1
answer
59
views
I can't upload an image to my database at all
I'm using django ninja for backend and nextjs for frontend, the code works i've already tested it in the docs several times but when I try to send it through an application that I'm making using ...
1
vote
0
answers
22
views
How do I get the real IP of the client when using Next.js with NGINX in Docker?
I'm working on a Dockerized Next.js application where requests are routed through an Nginx reverse proxy. My goal is to retrieve the real client IP address in my Next.js app. However, no matter what I ...
0
votes
0
answers
13
views
wallet connection loss in trust wallet
when i connect wallet connect application using next js in trust wallet the connection is loss after reload or refresh in mobile.when i connect it in metamask it is okey.why it happens?
i am using &...
0
votes
1
answer
24
views
How to pass data from client to middleware in uploadthing?
I have the button from uploadthing and i try to pass data by headers to the middleware but i get noting.
the button:
<UploadButton
endpoint="imageUploader"
headers={{...
0
votes
1
answer
22
views
nextjs: Link element leads to hydration errors
i'm investigating many hydration errors on my page that seem to come from my migration last year from an old next version into the most current 15.x. See Screenshots at the bottom:
Unhandled Runtime ...
0
votes
0
answers
11
views
How to get the user id that's stored in the database in authjs on signup
I'm not sure if this is a bug, or if it's intentional but when I sign up for the first time, and I print out the code below, it'll spit out a uuid that's DIFFERENT than the primary key of the users ...
0
votes
1
answer
27
views
Set type error try catch on typescript except error.message
I created a custom error message sent from the server side, of course I don't just use
error.message
to get the message. So I use
error.response.data
to get the message and get an error like the ...
0
votes
1
answer
15
views
No authorization header was set for the request. ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/@your-local-package
when trying to add a custom package to your Monorepo project as a dependencies
the error is :
ERR_PNPM_FETCH_404 GET https://registry.npmjs.org/@Custom-package: Not Found - 404
This error happened ...
1
vote
0
answers
9
views
tag a href download filename nextjs
.tsx
{notice.attachments.map((attachment, idx) => (
<li key={idx} className="pb-4">
<a
href={attachment.url}
...
0
votes
0
answers
11
views
I need help importing my global.css file in next.js
I believe this is a basic issue but as a novice in next.js I am struggling. I am trying to run my app when I attached error. Here is my code just in-case I've missed something whilst coding.
// C:\...
0
votes
0
answers
16
views
Next.js - I need static error page template in non-static app router based app
I have a React app using Next.js with the app router. The app is not a static site.
I'm also using Python for the backend, so I need a single static HTML file which could be used as a template for the ...
0
votes
0
answers
35
views
Return a promise that resolves when a event is fired
I'm currently using https://www.npmjs.com/package/whatsapp-web.js package and wrote this funciton. I need it to return the client ready to use client eventually. Tried to do it with a promise that ...
1
vote
1
answer
23
views
How can I access a cookie (refreshToken) on the server side in Next.js?
I'm trying to refresh the access token of a user when it expires by making a request to the backend Express server. To do this, I need to send a request to /auth/updateAccessToken and include the ...
0
votes
1
answer
18
views
how to fetch headers in middleware in Next js
In below NextJS code how can i access Authorization in middleware when client component call API every time api is call it show empty headers in middleware can some on explain it
Client Component:-
'...
1
vote
2
answers
46
views
How to import svg icons in Nextjs 15
I downloaded the Vercel Ecommerce template and want to use it with custom icons.
I have installed @svgr/webpack and configured next.config.mjs:
export default {
images: {
formats: ['image/avif', ...
0
votes
0
answers
28
views
How to secure a Nextjs API call with supabase service key?
I am creating an API call in a Nextjs (with Supabase) application which need to be secured. For my application a user should be logged which is enforced by the middleware and the await supabase.auth....
0
votes
0
answers
8
views
NextAuth cookie not being sent when I use the development server, but being sent when I use Hoppscotch/Browser to send the same request
The session is null in the GET request but defined in the POST request.
Session null here
export const GET = async (req: NextRequest): Promise<NextResponse> => {
try {
await connectToDb(...
0
votes
0
answers
13
views
How to handle time taking processes in slack app view
import { NextApiRequest, NextApiResponse } from 'next';
import NextConnectReceiver from 'src/utils/NextConnectReceiver';
import { App } from "@slack/bolt";
//@ts-ignore
import dotenv ...
0
votes
0
answers
13
views
TypeError: Cannot read properties of undefined (reading 'server') while calling socket.io in nextjs
I am trying to implement real-time notifications in a Next.js application using Socket.IO. My goal is to emit notification counts from the server and display them in the client. However, I’m running ...
0
votes
0
answers
9
views
React Leaflet custom marker with NextJS window undefined
When I try to use custom marker icons with leaflet, building fails. Everything works in development, but when I run next build, I get: ReferenceError: window is not defined.
Here's my code for the ...
0
votes
0
answers
34
views
How to Upload an Image to Supabase Storage and Store the Public URL in a Form Using Zod and React Hook Form in Next.js?
I am working on a Next.js application where users can add books using a form. Each book should have an uploaded cover image that gets stored in Supabase Storage, and its public URL should be saved in ...
1
vote
1
answer
34
views
What are the benefits of Next.js Server Actions, and why should I use them instead of client-side API calls?
I am working on a Nextjs web application. I am using server actions for fetching data and submitting forms using rest apis in java spring boot. It works great. However, I have a few doubts in my mind ...
0
votes
1
answer
16
views
Force download doesn't work in ContextProvider [duplicate]
I am using Next.js (which is React based framework).
I want to force download some files, so I created custom context for that.
"use client";
import { createContext, useContext, useRef } ...
0
votes
0
answers
33
views
TypeError: The "payload" argument must be of type object. Received null on Next.js with Prisma and MongoDb
When trying to insert an object to database I am getting this error:
TypeError: The "payload" argument must be of type object. Received null
This is the POST endpoint:
import { prisma } ...
0
votes
0
answers
15
views
Update Server Component via a Client Component
I'm using Next.js 14 and working on a service page for a personal project. The goal is to server-side render service cards for SEO benefits while allowing the client to filter the services without ...
0
votes
1
answer
14
views
How to render text and list from markdown frontmatter on Next project?
There are two image.
I want to implement this two image using dynamic page like blog.
And I want to get data from markdown frontmatter.
how to make markdown file and how to implement this in Next ...
-3
votes
0
answers
28
views
Are there any UI libraries built on top of shadcn-ui with extended components? [closed]
I am exploring the shadcn-ui library for my project and am impressed with its design and components. However, I am curious to know if there are any third-party UI libraries or component collections ...
0
votes
1
answer
29
views
How to stop reloading the page when submitting Shadcn + react hook form?
I have an issue when submitting a simple login form. this is my code:
const form = useForm<LoginForm>({
resolver: zodResolver(loginSchema),
defaultValues: {
email: "",
...
-1
votes
0
answers
23
views
getServerSideProps equivalent for Nuxt 3 using mongodb driver
What is the Nuxt 3 equivalent way to translate this Next.js page into a Nuxt page?
export const getServerSideProps: GetServerSideProps<PageProps> = async (
context
) => {
context.res....
0
votes
0
answers
30
views
No Tailwind CSS classes is working after NextJS 15.1.3 upgrade
Good day.
I upgraded to NextJS 15.1.3 and after that I see not a single TailwindCSS class working.
I even tried to create a brand new project from scratch and not even NextJS default landing page has ...
1
vote
3
answers
46
views
if I import a client component to a server component, will it make the server component, client component?
so we all know that if we import a server component inside of client component, it will also convert the server one to the client, unless we pass it as children.
so a client component with children ...
-1
votes
1
answer
22
views
'use' is not exported from 'react' (imported as 'use')
I get this error when I build my nextjs app:
'use' is not exported from 'react' (imported as 'use')
I believe the error comes from the file, './node_modules/next-view-transitions/dist/index.js'. My ...
0
votes
1
answer
36
views
Unable to select option within select element with playwright
I have the component below that loads a list of countries from an API. It uses the list to populate the options under a select HTML element.
import { CountryDto } from '@/lib/models';
import { ...
0
votes
0
answers
24
views
The reason why the session returns null when calling an API from a server component in next-auth
Here is a component. When this component is written as a server component and a client component, it is as follows.
// ...RSC
export default async function Example() {
const data = await fetch("...
1
vote
0
answers
23
views
Installing Deno with CLI error Permission on ubuntu 22.04
I got error when I install Deno with cli on ubuntu 22.04
curl -fsSL https://deno.land/install.sh | sh
I got error message
warning: Failed to open the file /home/USER/.deno/bin/deno.zip: Permission
...
0
votes
0
answers
31
views
role based access control in nextjs using authjs and database with google oauth
I have a condition where certain pages can be accessed according to their role in database
I have followed the tutorial on the Authjs site, and it seems like there is a lack of information, because ...
4
votes
0
answers
32
views
Next.js 14: ReferenceError: window is not defined when using intl-tel-input-react
I'm trying to implement a phone input component in my Next.js 14 application using the intl-tel-input library. However, I'm getting a ReferenceError: window is not defined error during server-side ...
0
votes
1
answer
25
views
React 19 Hydration error by initializing useState
Why I'm getting hydration error by initializing the useState?
If initial timestamp will not appear the ui looks like void for an extra space because it took seconds to appeared the timeAgo if not ...
0
votes
1
answer
32
views
How do I get a NextUI ListBox to scroll to the last ListItem?
Some background, I'm attempting to create a message chat feed.
I have a NextUI ListBox component that has the property isVirtualized and the appropriate params. It is created using the following:
&...