20 questions from the last 7 days
Best practices
0
votes
2
replies
88
views
Best way to initialize data in next js app router with zustand
I’m building an e-commerce type website in Next.js where there are multiple sections of stores. Each store card has a heart icon to mark it as a favourite.
The same store can appear in:
multiple ...
0
votes
1
answer
64
views
Laravel + Next.js show method
I know it's an unconventional pairing, but I am using Next.js and the Laravel stack for my app.
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\...
2
votes
0
answers
67
views
How do I resolve `state_mismatch` error with Google OAuth in a Next.js app using Better Auth?
I have a Next.js application with Better Auth setup. I can sign up and log in fine using email and password. I implemented OAuth sign in with Google, but that only worked once or twice. If I somehow ...
0
votes
1
answer
55
views
App Freezing when I submit a form using Actions in Next app?
I'm currently working on my first NextJS app after a long hiatus. The first thing I'm working on is a small app that's powered by Firebase.
After reading some documentation on Context and then ...
0
votes
2
answers
55
views
Tailwind dark mode classes not working even though .dark class is applied [duplicate]
I'm trying to implement dark mode in my Next.js app using TailwindCSS. However, TailwindCSS's dark: classes are not being applied, even when the .dark class is present on the <html> tag.
global....
-1
votes
0
answers
50
views
Is there a way to call the tRPC client with tRPC and @tanstack/react-query setup? [closed]
I have set up my tRPC backend as per the docs which I'll paste in below. My issue is using it with @tanstack/react-query works perfect for 90% of my use cases but I can't physically call my backend ...
1
vote
0
answers
42
views
Getting a prerender error that a file is consuming server side logic but its client side
I'm using the entry file at the root of my app as a data layer, for redirects depending on session, which I'm retrieving using getServerSession. If at a point no session exists, user should be ...
-1
votes
1
answer
29
views
How to manage multi-region branding (colors + UI variations) in a single Next.js repo without increasing code complexity? [closed]
I’m working on a telco project that will be deployed across eight different regions.
Each region will have:
Different color branding
Possibly some UI component variations
However, all API ...
Advice
1
vote
1
replies
50
views
How do I make an authenticated request from my Next.js API on Supabase with RLS enabled?
In my case, I only want authenticated users to perform a SELECT query on my database, so I set up my RLS Policy for this scenario. This is where I am hitting an issue. With RLS enabled, I need to let ...
-5
votes
0
answers
39
views
next js package.json devdependance Question [closed]
in package.json in next js:
"devDependencies": {
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19&...
-1
votes
0
answers
30
views
Next js 16 Turbopack build error."TypeError: Cannot read properties of null (reading 'constructor')"
After upgrading to next js 16, i'm getting the following error when i run pnpm build. But it is working find when using webpack.
The error:
> pnpm build
▲ Next.js 16.0.3 (Turbopack)
- ...
-6
votes
0
answers
30
views
How to view pdf,xlsx,docx,ppt in nextjs from s3 getobject url [closed]
My s3 url is getobject url - .pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=&X-Amz-Date=&X-Amz-Expires=&X-Amz-Signature=&X-Amz-...
0
votes
0
answers
26
views
Next.js + AWS Amplify Middleware not redirecting after first login until refresh
I am working on a project using Next.js (App Router) and AWS Amplify Auth. I have implemented middleware to restrict access and redirect users based on a custom Cognito attribute (custom:...
-4
votes
0
answers
30
views
Next.js: Hydration failed por “Unexpected attribute cz-shortcut-listen" — como resolver? [closed]
Pergunta
Estou recebendo o seguinte erro ao iniciar meu projeto Next.js:
Hydration failed because the initial UI does not match what was rendered on the server.
Unexpected attribute: cz-shortcut-...
0
votes
0
answers
20
views
Next.js artifact built in CodeBuild fails on EC2: MODULE_NOT_FOUND / 'next' not recognized (node_modules missing)
Correctly Deploying Next.js App to EC2 Using CodeBuild + CodeDeploy (Missing next at Runtime)
What I think is happening
CodeBuild successfully runs npm install and npm run build.
The generated ...
-1
votes
0
answers
37
views
Usage of multiple created npm modules in one project via npm workspaces
I have created a Next.js (TypeScript) application, called "vkdgen".
Afterwards, I've created and published a small component library for my project called "vkdFramework4NextJS". ...
-1
votes
0
answers
38
views
Work with npm local packages in NextJS project
I need to work with a local package with my next.JS project. To avoid publishing on npm every time :
- On the next.js project: npm i ../test-sample-api. I can now see on my package.json the line : &...
0
votes
1
answer
29
views
Build Error in ReactPress - error TS6053: File 'src/*.ts' not found
I'm encountering an error when trying to run pnpm run dev in my ReactPress project (version 1.6.0). The build process fails during the build:config step with a TypeScript error stating that files in ...
0
votes
1
answer
25
views
How do I enable streaming in a NextJS app that is self hosted?
We are self-hosting the NextJS app with an Nginx proxy. The streaming functionality allows for the suspense states to show up while the page is loading. I am aware this is available by default if the ...
0
votes
0
answers
19
views
MUI X-date-pickers output and none visible redundant characters
I'm using "@mui/x-date-pickers": "^8.19.0" and @mui/material": "^7.3.4" in a "next": "15.5.6" application with "react-dom": "19.2....