All Questions
2,240
questions
0
votes
0
answers
13
views
How to create a different URL for each dashboard page - NextJS 14
NextJS newbie here, so I apologize in advance if this has been asked before. I'm feeling really overwhelmed with all the information I'm finding and I'm not sure how to proceed.
I have a NextJS ...
0
votes
2
answers
47
views
How can action on clientside dispatch action on serverside?
I have a theme switch toggle on the top AppBar which is a client component.
The main layout is SSR and uses the nextjs App router. It has theme settings <ThemeProvider theme={lightOrDarkTheme}>....
0
votes
0
answers
15
views
NextJS App router reusable custom hook for data fetching
I'm currently trying to migrate a project from NextJS pages router to the app router.
In my old project, I had the following structure:
/src
/components
/hooks
customHook.tsx
/services
...
0
votes
0
answers
22
views
Why won't my next.js credentials login with email and password work while my google provider authentication does?
I am trying to make a login page with Next Auth V4, and I have followed some instructions online that seems to work well for the google provider which works, but my "credentials" email and ...
0
votes
0
answers
13
views
Image Working on Localhost but Broken in Production in Next.js
I'm working on a Next.js project where images display correctly on localhost. After running npm run build and npm start, everything works fine locally. However, once deployed to production, the images ...
0
votes
1
answer
46
views
PDFKit library working in Express.js but not in Next.js API route
I'm working on a project where I need to generate PDFs using the pdfkit library. I've managed to get it working in an Express.js server, but I'm facing issues when trying to do the same in a Next.js ...
0
votes
0
answers
27
views
Next js build time too long
I bought a template built on Nextjs 13 and I found that the build time is too long
The server take too much time to build components or pages
even I am not doing any request or fetching from an api
...
0
votes
0
answers
27
views
Uploaded Images can't delete in cloudinary for nextjs
I implemented the code for uploading and deleting images in cloudinary for nextjs, image uploads worked very well but image deletion is not working. i created api/upload/route.js from from the app and ...
0
votes
0
answers
20
views
using cookies from next/headers marks all pages as dynamic
When I am using cookies from "next/headers" it marks all pages as dynamic, this is not what I want my structure is like this in layout.tsx I have a child server component in which I want to ...
0
votes
1
answer
22
views
Error When Adding Middleware to Protect Dashboard Route in Next.js Project
I am using Turborepo to create a Paytm like wallet, I have two next-apps, user-app, merchant-app and webhook handler in express.
user-app
├── app
│ ├── dashboard
│ │ ├── dashboard.tsx
│ ├── ...
0
votes
2
answers
30
views
Force pages to re-render (Next.js App-Dir)
For this question I have created the following demo Next.js application using the App directory:
It has a standard RootLayout in app/layout.tsx.
It has a nested Layout in a route group app/(app)/...
0
votes
0
answers
26
views
Nextjs Script Doesn't Work With Conditionals
// _document.js, doesn't work
const isProduction = process.env.NODE_ENV === "production";
const nonce = "1234-abcd-wxyz";
// ...
<Html lang="en">
<Head nonce={...
0
votes
1
answer
29
views
Next JS Links sending users to wrong page on Firebase Hosting
Background: I am using NextJS hosted on Firebase hosting. My pages all have a Navbar component with an "Account" button. The button is a NextJS Link with href="/account".
When ...
0
votes
1
answer
57
views
window is not defined in NEXTJS 14 Build
I am trying to create a build of my nextjs project but it keeps on failing and showing the below error where as it works perfectly during development. I haven't used the 'window.' in my whole project ...
0
votes
1
answer
22
views
Next.js server actions for endpoints which aren't invoked from the client side?
With Next.js 13/14 server actions where introduced, which makes some endpoint declarations in pages/api/ obsolete.
What I'm not sure about: many of my endpoints are there for callbacks, e.g. in the ...