Category "next.js"

Error: VM Exception while processing transaction: reverted with reason string 'ERC721: transfer caller is not owner nor approved'

i try to write NFT marketplace and i have problem with reselling items from user that buy item from owner and new, third user. I use next.js + openzeppelin + ha

Next js, ReactDom.render is no longer supported

I just spun up a new Next JS app with Next 12. I am getting this error on all page loads in the browser: Warning: ReactDOM.render is no longer supported in Rea

Next.js nested dynamic folder routing

Update: Which it causing this error because of [category_slug]-index.js that getServerSideProps? I tried to do index.js under product folder, it works, mean it

How to post data to supabase through next.js

I currently have a simple next.js website where users can look at projects for an organization, and at the bottom of the page, the user can input a new project

Redirect page to url Next.JS

I have a simple web page running next.js, the page just returns the "Hello World" element and I would like it to redirect me to another URL (youtube) instead. I

Firebase TypeError: Cannot read properties of null (reading 'indexOf')

When I console.log(docSnap) I'm getting a firebase error, see in the below image. I have tried all the solutions but none of them worked. useEffect(() =>

how to strongly type body of NextApiRequest in Nextjs [duplicate]

wondering how to define the type of body of an API POST Nextjs route in order to benefit from typesafety ? In the NextApiRequest, body is defi

Cannot read properties of undefined (reading '0')

I have a page coded in React with NextJS hooks, when I try to render a page the error says what's in the title, I presume because the object which I'm mapping i

next.js, is server side pages rendered faster?

I have a page that is hidden behind auth, so SEO doesn't matter. It includes fetching quite a lot of data. Will the page finish loading faster if I use SSR and

next.js, is server side pages rendered faster?

I have a page that is hidden behind auth, so SEO doesn't matter. It includes fetching quite a lot of data. Will the page finish loading faster if I use SSR and

Error When Writing Files in Node Environment with Next.js Deployed on Serverless Cloud Functions

I am building a Next.js app using the version 12.1.6 and Firebase Cloud Functions as a serverless function. In the local environment, it works without any probl

NextJS - new Date cached on server

i am trying to always get a now Date on my server, but it get a cached date. I use yarn export to upload my files on a hosting server via ftp. My code is: expor

Error: A required parameter (id) was not provided as a string in getStaticPaths for /location/[id] [duplicate]

im working on a next.js and mongodb website and im following this tutorial exactly but with different files/variable names. i keep running int

next build error occrred from performace-relayer

next build occurred error by ReferenceError: location is not defined at Object.<anonymous> (/PATH/node_modules/next/dist/client/performance-relayer.js

Moving Pages folder in Next.js application to src folder

In a create-next-app Next.js application, I want to move the pages folder in the root directory to a src folder. I added a jsconfig.json with the code (below),

How to get origin or domain name in Next.js [duplicate]

I can get the relative pathname using useRouter().asPath which gives something like /my-awesome-post but how to get the origin? Similar to wha

Nextauth token keeps on nesting

I updated with v4 beta with next-auth. But the token keeps on nesting on refresh, as in token converts to token.token to token.token.token .... on each refresh

How to make Next.js "see" the react-dom package?

This is my first ever Next.js project, and I encountered an odd obstacle. Even though I made sure at least 3 times that I have react-dom and react installed and

NextJs router seems very slow compare to React Router

I have a website built in React Js and the same one on Next Js as well. The problem which I am facing right now is, the router seems very slow in the nextJs com

NextAuth Credentials, adding more to the user scheme

Nextauth with mysql persisting users. I'm trying out this NextAuth thing to see if this is something I like. So far so good. There is one thing tho which is bug