Skip to main content

Questions tagged [next.js14]

Next.js 14 is a version of the Next.js JavaScript web development framework released on October 26th, 2023 and includes improved memory management and performance, Turbopack, a new Rust compiler, support for partial rendering, and stable server actions. Use this tag only for questions specific to Next.js 14 and its features. For generic Next.js programming questions, the [next.js] tag should be used.

next.js14
0 votes
0 answers
16 views

"You're importing a component that needs next/headers. That only works in a Server Component which is not supported in the pages/ directory"-error

I'm following this tutorial to create a preview mode in Sanity. But when importing: import { draftMode } from 'next/headers'; into client.ts I'm getting this error: Error: × You're importing a ...
marylee's user avatar
  • 71
0 votes
0 answers
9 views

What information is contained in the trace file in the .next directory of a Next.js project?

I am working on a Next.js project, and I have encountered an issue where the build process is extremely slow, taking almost an hour to complete. While investigating the potential causes, I came across ...
J. Kim's user avatar
  • 33
0 votes
0 answers
5 views

Mongodb Atlas FindByIdAndDelete operation timed out

I am using Postman to test deleting a document on Mongodb atlas in a NextJs 14.2.4 application using the api router. This is the route: import { connectToMongoDB } from "@/app/lib/db"; ...
Imari Childress's user avatar
0 votes
0 answers
20 views

Why am I getting a 404 Page Not Found error in my Next.js 14 application?

I am encountering a 404 error, along with the correct content, in my Next.js 14 application. I have checked the folder structure, but I still don't understand what the problem is. If I route to other ...
anandhi manickam's user avatar
-4 votes
0 answers
21 views

Next.js 14 Cache CANNOT BE DISABLED ... NO MATTER WHAT ... IS THIS A BUG?

next.js caching cannot be disabled ... I've used: export const dynamic = 'force-dynamic' ... no luck revalidate: 0 ... no luck cache: 'no-store' ... no luck all combined ... no luck and then this ...
Da Moose's user avatar
  • 103
0 votes
0 answers
6 views

Next.js App router behavior in building a page when generateStaticParams is provided and layout is dynamic

this is my folder structure I am using next.js 14 in root layout i use user data to display user avatar which cause all pages become dynamic in page.js inside /cabins/[cabinId] i have exported ...
hamid-beigi's user avatar
0 votes
1 answer
54 views

npm ERR! npm ERR! sh: line 1: node-waf: command not found [closed]

I got an error during deployment, as follows: npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm WARN ERESOLVE overriding peer dependency npm ERR! npm WARN ERESOLVE ...
Solideo Putra Zendrato's user avatar
2 votes
0 answers
71 views

Getting error: Failed to parse body as FormData in Next.js 14 app router

I have a Next 14 app router project, so the problem is in the dashboard page and in a more clear way in the add and update form, I'm using Formik to handle the forms and then I send the data as ...
Abdulkerim Awad's user avatar
0 votes
0 answers
13 views

"Chrome is undefined" error when using chrome extension API in next.js [duplicate]

I am trying to send a message through chrome API from my next.js app to the extension app. I'm using useEffect to call this function in one of my .tsx context files like this: useEffect(() => { ...
Ashgreninja55's user avatar
0 votes
0 answers
20 views

Next js 14 app router always Hard refresh when behind cloudfront

I am working with nextJs 14 app router and it's behind CloudFront My application works very weirdly it is always hard refresh irrespective of whether I use the Link component of the nextJs. I have ...
Ronak's user avatar
  • 359
0 votes
0 answers
20 views

Deployment of Static Site Generation (SSG) in next.js 14 version

I need to build a Next.js app where I have Static Site Generation (SSG) pages. This means that I want to generate static pages at build time. I need to get information for my static pages from a ...
Денис Могила's user avatar
-7 votes
0 answers
123 views
+500

How to properly handle internal/external API errors in service-, data- & app layers in Next.js? [closed]

I'm building a Next application with the following layers: lib/service (async server-only functions doing a fetch from an external api and returning the data) data (async server-only functions that ...
Dac0d3r's user avatar
  • 1,311
0 votes
0 answers
19 views

Syntactic problems with Redux middleware when try to add .concat(authMiddleware)

Here is authMiddleware: "use client"; import { Middleware } from "@reduxjs/toolkit"; import { clearUserProfile } from "../reducers/userProfile"; import { clearIdToken } ...
Cường Trần Văn's user avatar
0 votes
0 answers
15 views

Next.js 14 - require crypto error with mysql2 in turbo mode

For the past few days, I've been trying to get turbo mode working in Next.js 14 with MySQL2. Despite using every available resource to solve the issue, I'm still stuck with the error. My large project ...
Me Unagi's user avatar
  • 425
0 votes
1 answer
26 views

How to pretend to render any Components of root Layout.js to an specific route in Next.js?

I'm working in Next.js, in my root Layout.js file I added some Components, and they are rendering in my all the routes as I expected. But I have a route /mobile, where I want want these Components to ...
Aman Yadav's user avatar

15 30 50 per page
1
2 3 4 5
34