Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

mongodb nextjs14 connection error in local

I have setup mongodb with nextjs14 using a singelton class. I am on windows but mongodb is running on ubuntu in local. The connection gets established when the laptop starts but after a few hours it ...
Dhruv Arora's user avatar
0 votes
0 answers
13 views

Next js middleware cause this "app-pages-internals.js:1 Uncaught SyntaxError: Unexpected token '<' (at app-pages-internals.js:1:1)"

I am using NextJS 14 app router and I can't go back because site is in prod. What I am trying to do is when fetch user is called i update route in cookie (route coming from server) at first everything ...
Muhammad Hashim's user avatar
0 votes
0 answers
13 views

Add multiple subdomains from same parent domain for vercel projects

Is there any way to use multiple subdomains from a single parent domain? For Example I already have configured a domain called mydomain.com with a vercel project. Can I add subdomain.mydomain.com and ...
Bhalli Bhai's user avatar
0 votes
0 answers
13 views

Next js Sever doesn't start one stopped stuck on Starting... screen

I am using latest next js version as of 09 September 2024 and using LTS supported node version 18 so when I start my server using npm run dev it works fine but if i were to stop it mid way and then ...
jethiya007's user avatar
0 votes
0 answers
19 views

How to set Azure MSAL SSO for my Nextjs14 app using Approuter and next-auth

I am building a nextjs 14 app which uses app router with src/app/.. structure Is using layout.tsx as entry point for my application. I do not have pages folder or _app.tsx as mentioned in many ...
soujanya Nekkanti's user avatar
0 votes
0 answers
19 views

nextJS server actions fails with react query on special syntax

I have small in file my nextJS project that has the "use server" annotation. It exports a function: export async function getData() { Promise.resolve({foo: "bar"}); } And i use ...
T. Grumser's user avatar
1 vote
0 answers
31 views

How to Differentiate Between Navigation Route Change and Initial Load in Next.js 14?

I'm currently working with Next.js 14 and its App Router paradigm to manage navigation within my application. I have implemented a background color transition on certain pages that is triggered when ...
MMM's user avatar
  • 11
0 votes
0 answers
3 views

How disable prefixing on /dashboard pages with next-intl while still running middleware to avoid unauthorized access

i want to disable route prefixing on /dashboard routes in my nextjs app. here is my nextjs middleware.ts const intlMiddleware = createMiddleware(routing); export async function middleware(request: ...
gigi shalamberidze's user avatar
2 votes
2 answers
32 views

Unable to load api on server component

This is in a NextJS version 14.2.7 app. I have setup up an api under the following path. src/app/api/posts/route.ts When I call it from a client component as follows, works fine. const ...
kar's user avatar
  • 3,571
0 votes
0 answers
18 views

Vercel AI SDK error: UnhandledRejection: TypeError: cookies is not iterable

I'm new to the Vercel AI SDK, and I'm trying to implement some AI features in an existing NextJS app (app router, v14.2.8, using npm). I tried implementing all of the code examples from the ...
Anon.eth's user avatar
0 votes
0 answers
32 views

Next auth(Authjs) session is null on Nextjs 14 server page

import { auth } from "@/auth"; const page = async ({children}) => { const session = await auth(); return <div>{children}</> }; // My auth config import { Pool } from &...
key's user avatar
  • 21
0 votes
0 answers
44 views

add "use client" into index.ts that exports all of component stuffs

I am using nextjs 14 and I create all components in src/components directory and each component has index.ts file that will exports all of my components stuffs such as subcomponents, types, context ...
AmirHossein's user avatar
0 votes
1 answer
41 views

Build failed because of webpack errors - Unknown word - CssSyntaxError

I am using NextJS 14 with Tailwind. The project works fine in dev mode but I got an error during deployment. I got this error. ▲ Next.js 14.2.8 Creating an optimized production build ... Failed ...
sahilatahar's user avatar
1 vote
0 answers
8 views

Next.js redirect not working after setting success flag in useEffect

I’m working on a Next.js project where I want to redirect the user to the home page ("/") after a successful operation (e.g., user login). I’m using useEffect to trigger the redirection when ...
Farida Mullamitha's user avatar
0 votes
0 answers
15 views

What about routing jumps for writing jumps to write a dead 308?

Nextjs app router, What about routing jumps for writing jumps to write a dead 308? If I need a 301, how should that work? For example, if I type in the address bar of my browser with a slash ending: ...
kai gan's user avatar
  • 31
-1 votes
1 answer
29 views

Nextjs 14 pages folder, output:"export" is not working

I'm working on nextjs 14.2 version with pages folder. I don't have any images, /api routes or anything yet. This is an old nextjs app, updated to latest version. When I run npm run build, it is not ...
Kalyan's user avatar
  • 315
0 votes
0 answers
20 views

How to lazy import a CSS file created by Tailwind in NextJS?

I check my site performance in GTMETRIX and it says : Eliminate render-blocking resources. I use NextJS & Tailwind. GTMETRIX says for solve the probolm use this: A tag that appears in the of ...
Mohammad Reza Zolfaghari's user avatar
0 votes
1 answer
36 views

why Next.js API Routes respond 404 except for GET request [closed]

My version is Next.js 14+. When using "GET" request, it works. But, when I make POST or PUT request I get Error 404. How can I deal with the API routes correctly? I don't know if it is ...
user18820808's user avatar
-2 votes
1 answer
39 views

NextJS - Trying to change Navbar background and logo based on which page user is at [duplicate]

NextJS noob here. I'm building a site with a navbar, and I want to have a different background depending on what page the user is at. I've created some states in the Navbar and a useEffect, as well as ...
Mark Rosenberg's user avatar
0 votes
0 answers
18 views

Hydration error in next js getServerSideProps

enter image description hereimport { Grid } from '@mui/material'; import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import { useState, useEffect } from 'react'; import ...
Mohammed Sabir's user avatar
0 votes
0 answers
22 views

Warning: Extra attributes from the server: cz-shortcut-listen at body at html at RootLayout (Server)

I'm getting this warning in my nextjs application , i"m using nextjs 14 and this warning shows up in the browser console Below is what shows up in the browser Warning: Extra attributes from the ...
Toothless_injustice's user avatar
0 votes
0 answers
19 views

My Heros height which is 100vh shrinks when using a link to scroll to a different section

My Heros height is 100vh. When ai use the header to scroll to a different section, and then scroll manually to the top again, the 100vh height shrunk a bit. The bug fixes itself when scrolling to Home ...
toaster's user avatar
  • 11
0 votes
0 answers
47 views

Next.js suspense server-side doesn't work

I'm encountering an issue with Next.js 14. I want to load an Async component in the Page component. In the component, I simulate a server delay of 5 seconds. However, what happens is that I end up ...
Volcom's user avatar
  • 3
1 vote
0 answers
30 views

implementing Incremental Static Regeneration(ISR) without keyword "fetch"

I've tried many ways to make my one page in this web app build in ISR- this app uses Google Spreadsheets as a database and the user fills out the spreadsheet, and it populates the page. I want it to ...
Ryan's user avatar
  • 13
0 votes
2 answers
49 views

Why are images not appearing on my nextjs app running on Ubuntu server?

I've got a weird issue with my nextjs app on a ubuntu box. I'm using nginx. I have the uploads folder in the nginx config for the site: location /uploads { alias /home/ubuntu/staging/thomson-...
Jason Shultz's user avatar
0 votes
0 answers
16 views

How to resolve build errors in Next.js?

I have such an error after building in nextjs, I can't build the project for some reason, you can see the error I got below, what could be the reason, if you know, please help!!! Y [AggregateError] ...
Oybek Bakhtiyorov's user avatar
-1 votes
5 answers
93 views

I can not make proper use of useState in Nextjs

When the first request is sent, isVoting will be set to "true". In this case, until isVoting is set to "false", another request should not be allowed to be sent. But somehow ...
Muhammadali's user avatar
0 votes
0 answers
14 views

contact form using nextjs emailjs react-hook-form and react-toastify

I am trying to build a contact form, but it isn't working, the validation is fine but the emailjs implementation is not working the input doesn't show the data the console got some errors but nothing ...
jm1004's user avatar
  • 3
0 votes
0 answers
18 views

How i can prevent re-rendering the page in Nextjs app router on query update

I'm trying to add or update query in url for sorting purposes so that i could use it in other components as per need. i used next/navigation router to handle it. this SortBy component is used in ...
Abdul Majid 's user avatar
0 votes
1 answer
19 views

Is there any way I can get all the 'Developer Console' or 'DevTools Console' data from the browser to my VS Code IDE?

I was working on a Next.js 14 app route project with AI, where it functions similarly to Copilot. I provide both browser and server errors, and it debugs and gives the correct solution. However, the ...
balaji gv's user avatar
0 votes
0 answers
22 views

Nexjs 14 upgrade : Error while trying to upgrade or create a new nexjs 14 app

Trying to get nextjs 14 up and running with the below code also tried to upgrade the existing nextjs 13 to 14, but getting the same following error Please find the code in the codesandbox https://...
PremKumar's user avatar
  • 1,344
1 vote
0 answers
26 views

Page loading slow even after optimised build

The following page component is at location src/app/posts/[slug].tsx This is using Next JS 14. For that api call to http://localhost:5001/posts, I purposely added a 5 seconds delay. So during npm run ...
kar's user avatar
  • 3,571
0 votes
0 answers
42 views

API is working at development, but in production fails

I am trying to run my site in nextjs (typescript) with my API. When I run it in development, the API works, but when I run on production (vercel), it throws a timeout. In the API call, I pass one ...
Matan15's user avatar
0 votes
0 answers
20 views

How do you set dokku environment variables for a Nextjs application

I have a Nextjs application deployed on dokku but it does not find dokku environment variables. I have also tried to read the environment variable from a Next api route and still return nothing. Next ...
Becksholm's user avatar
0 votes
0 answers
15 views

PrismaClientKnownRequestError: Invalid `prisma.auth.findUnique()` invocation:

This request could not be understood by the server: {"type":"UnknownJsonError","body":{"code":"P6008","message":"Accelerate was not ...
Keth Mark's user avatar
1 vote
0 answers
35 views

Kafkajs `consumer.disconnect()` not resolving

i currently start experimenting with KafkaJS with the following use-case: I want to retrieve all messages within a given timerange. So i build a server action which creates a kafka consumer, ...
Peter C. Glade's user avatar
-1 votes
0 answers
16 views

How can I use a singular Docker image that can be promoted through multiple environments with different values for the nextjs app?

I'm developing a Next.js application and using .env files to manage environment variables for different environments (staging and production). I'm building the Docker image in separate steps and ...
enescan's user avatar
0 votes
1 answer
22 views

How to give new line spaces in sanity portableText content?

i tried to add new lines in sanity studio but didn't get new line in between contents in portable text library, i rendered into my Next js 14 project async function page({params}:{params: { slug: ...
Sreerag Sager's user avatar
0 votes
0 answers
35 views

smooth transition effect with tailwind and nextjs

I have some mistake here in below code. I want to do this smooth transition effect like this in product images check it here: https://demo.ar-themes.com/hanout/product/%d8%af%d9%85%d9%8a%d8%a9/ I try ...
Oussama Djedidi's user avatar
0 votes
0 answers
36 views

How to use Dynamic Subdomains in NextJS 14 with Clerk Auth

I have a NextJS 14 (app router) application with Clerk auth, but I want to add dynamic subdomains so each business will have a subdomain (e.g. thomas-bistro.mysite.app). Due to Clerk middleware this ...
Thomas Price's user avatar
0 votes
2 answers
31 views

I can't get middleware stacking to work on next14 app router (for i18 and auth)

I'm working on a next14 project, I currently have middleware set for i18 and am trying to add a second middleware for authentication using auth.js (next-auth). I've now gotten both middleware to work (...
xXnikosXx's user avatar
  • 337
0 votes
0 answers
18 views

NextJS not updating data in production

I am new to Next JS. My Next JS application was working fine on dev environment but as soon as I went to production the get methods are not working meaning its only fetching pre rendered data on build ...
Danial's user avatar
  • 21
0 votes
0 answers
69 views

Animating Seamless Page Transitions in React with Next.js (and updating URLs)

For a project within our organization, we are developing an app using React (preferably Next.js). The UX team has designed an animation for the transition between two pages with different URLs. In the ...
Tom's user avatar
  • 1
0 votes
0 answers
13 views

NextJs 14 Dynamic Sitemap Issue on Live Envioment

I am having an issue with the dynamic sitemap. I have this sitemap.ts file in the app route folder. import type { MetadataRoute } from "next"; async function fetchSitemapData() { const ...
Ali 's user avatar
  • 76
0 votes
1 answer
34 views

Spacing in Tailwindcss

Im fairly new to web development and especially Tailwindcss, im trying to get my footer navigation to float right but Im not able to get it to work. Tried "gap-96" "space-x-96" &...
LCS's user avatar
  • 3
0 votes
1 answer
54 views

Hydration is not happening in next js with zustand

We are having a nextjs(14) app router application with zustand state management. During SSR, we are prefilling the form data for the page. On client side we have some events based on change of one of ...
saishankarmanugula's user avatar
0 votes
0 answers
38 views

Need Help to make a POST request using react-hook-from and zod in nextjs 14.2

I am a newbie. I am trying to make a post request to the express server. I am using typeScript and Shadcn/ui form with zod validation. I have to make a POST request like this JSON object below. I am ...
Hrittik Bhattacharjee's user avatar
1 vote
0 answers
25 views

Chaining middlewares in Next js 14 for auth.js

I have a next js application which has multiple lingual support. So I have a middleware to redirect users to URL with the locale. I want to implement auth js in this application. export function ...
Shridhar's user avatar
0 votes
1 answer
49 views

Clerk NextJS Causing Multiple Page Redirects

I'm using clerk/nextjs 5.1.5 in my next 14.2.4 app with middleware. My home page is not protected by middleware and is publicly accessible. I want my home page to be indexed by Google. However, it isn'...
indescriptCrayon's user avatar
-1 votes
1 answer
39 views

'auth_uri' does not exist in type 'JWTInput | ExternalAccountClientOptions'

I'm a newbie I'm trying to deploy a Nextjs website to Vercel, everything works properly when I run and build it locally but then when the application is building on Vercel, I get this error from ...
Dr Ritany's user avatar

1
2 3 4 5
7