Category "next.js"

Error: Cannot find module 'node:fs/promises' (next-sitemap)

next-config.js /** @type {import('next').NextConfig} */ module.exports = { i18n: { locales: ['en', 'ru'], defaultLocale: 'en', }, publicRuntimeCon

NextJS and NextAuth session user object getting lost due to [...nextauth.ts] getting triggered to be recompiled

I am learning NextJS and NextAuth and have implemented a Credentials sign in with my own login page and it is working where the session object contains my user

ReferenceError: ResizeObserver is not defined with nivo and NextJS

I want to use nivo with Next but when I load the page containing a pie chart made with nivo, I get this error: ReferenceError: ResizeObserver is not defined. My

Why getStaticProps giving error of "Failed to load SWC binary for win32/x64"?

I am using getStaticProps() in a Next.js app but when I run the app it gives ERROR:- warn - Attempted to load @next/swc-win32-x64-gnu, but it was not installed

How to configure NextJS Server API GraphQL Subscription

currently i'm learning how to develop an application using graphql. I'm facing the error of implementing the subscription inside my application resolver.js cons

Next.js: React Apollo Client Not sending cookies?

I'm using Apollo Client as a graphql client on my next.js application, Here is the function that creates a client for me: let client: ApolloClient<any>;

How to bundle NextJS project into one single file

I'm currently building a project that will work as an addon to another application. I'm currently using NextJS to build the application, but I need to bundle th

'This user account is blocked. Contact [email protected]'

Clicking 'Continue with GitHub' fails I am attending the Udemy course React - The Complete Guide (incl Hooks, React Router, Redux) I have followed the instructi

Not being able to remove cookies on nextjs in production

I am creating an application in NextJs and I set the cookie authorization when the user make login: res.setHeader("Set-Cookie", [ cookie.serialize("auth

NextJS: load global plugin in Mongoose before model creation

I have a folder structure looking something like this root/ pages/ models/ User.js utils/ plugin.js dbConnect.js I want to be able to load th

nextjs does not support an empty link - what is a workaround for this?

I want to use a <Link /> with no content inside of it within my app, but for whatever reason, if I don't pass any content to it I get the "multiple childr

Preloading a .css file with NextJS

We are using NextJS and Material-UI for our site, and upon loading the pages, it gives a FOUC. I've narrowed the problem down to the fact that the JS loads fast

Problem finding string atached to json file when translating (i18n)

I have successfully translated many of the pages on my website project but now I have moved to translate specific components that were created and it is not wor

how to deploy custom github branch on vercel

Is there a way to select a custom branch to deploy ? I do not seem to be able to select a branch and it takes the default main branch thanks in advance

Scroll to the last item of a mapped array

I have a Message component that displays all the messages(incoming and outgoing) in one thread. I would like the last message/a newly typed message/incoming mes

Warning: Function components cannot be given refs

I'm using Next.js latest version for making my blog website, don't know why show me error, when I'm trying to make my form then show me error like this: Warning

passing props as classNames in next.js

I am trying to have the header of each of my app's pages change color based on the current page. How I am trying to achieve this: <Header className="headerBi

Node JS Using AND or OR operator - Fetching data

Good Day! I need help on the below issue: Goal: is to filter data depending on the department content. What I'm trying to do is to fetch data from MongoDB based

Tailwind height transition not working on h-min, h-fit, h-max, and h-auto

So I like to make transition whenever the element change it's height. It works on h-10, h-20, etc. But it doesnt work on h-min, h-max, h-auto. ‎‎‎&l

Fill parent container and reduce image resolution with next/image

I'm trying to fill a fixed-size container with an image. layout="fill" works like a charm, but even though container is only 125x125, the original image gets do