Category "next.js"

Next-Auth : How the registration is handled with a email + password credential provider?

How the registration is handled with a custom credential provider ( email + password)? Currently my [...nextauth].js looks like this: import NextAuth from 'next

Nextjs- api routes , How to remove a cookie from header?

I have two API routes which I want to set two cookies in /api/login.js and remove them in /api/logout.js. so this is my login API: import { serialize } from '

Error: A required parameter (slug) was not provided as a string in getStaticPaths for /posts/[slug]

I have the following [slug].js file in my project: import Head from "next/head"; import PostContent from "../../components/posts/post-detail/post-content"; impo

NextJS + Typescript built failed with @auth0/nextjs-auth0

I'm using Typescript for NextJS and I cannot build the application because it has some issues with the auth0/nextjs-auth0 This is the issue. If I install this,

NextJS Fast refresh not working as expected

I am building a website with nextjs and Chakra UI. I am using emotion to style my navigation. The code of navigation component is as follows: import Link from "

Mysterious flickering black line, almost like a border in NextJS

I have created a full-width video header that I've used successfully over several pages. For the life of me, I can't figure out why it has chosen JUST NOW to gi

How to setup getStaticPaths of multi-locale dynamic pages in Next.js

Today, in my side-project, I got a problem relate to setup getStaticPaths of multi-locale dynamic pages in Next.js. I researched and find out that there are so

Doesn't nextjs in vercel support Optional Chaining?

I see nextjs does support Optional Chaining here however, I've been trying to deploy this piece of code module.exports = { experimental: { outputStandalon

How do I debug a nextjs production build?

I have a bug (this one) that only happens in production, on the client side. Next.js by default silences all error messages in production, and turns off all log

how to get firebase use in nextJS getserversideprops

I want to get 'sample' document in Firestore using getServerSideProps if there is signed user. Code below doesn't work. It's result is 'can't read' What should

Using react redux with next.js

I try to use Redux with next.js starter project and I installed next-redux-wrapper on the project but I'm not sure where is the root file in this project. I try

Next.js: Reduce data fetching and share data between pages

I'm looking for solutions for better data fetching in a Next.js app. In this question I'm not just looking for a solution, I'm looking for multiple options so w

Adding external js script to next js

In my next project I need to add some script external js files. Like so: <script src="assets/js/productFactory.js"></script> I saw one post that

Puppeteer - custom fonts not loading in pdf but do appear in screenshots

I am trying create PDF files dynamically using the puppeteer lib but the pdf that is generated doesn't use the custom fonts (.woff) instead uses default system

Consume Cloud Run environment variables inside Nextjs app

I've recently built a Nextjs app, which I am hosting on Google Cloud Run. My app makes some requests to external APIs from the getStaticProps() method. I would

Where do I get user and pass for email form api setup?

I am trying to get this form working in Nextjs using 'React Hook Form'. So far I think everything is okay, but I need to know where to get the 'user' and 'pass'

Manipulating server side API with state value

So I built an app in React but later switched to Next.js as my api provider only accepted api calls in the server side, I had built a pagination in react very e

502 BAD GATEWAY GET / TASK TIMED OUT AFTER 10.01 SECONDS

I am using Next.js and express as front end and back end server. Next.js hosted on the Zeit Now, express app hosted on Heroku. If I go to express app, I can mak

Is not-returned code and content available for public in the source code?

I am new to nextjs and webdev. I been following a couple of tutorials but I still have a doubt. Lets say I have this page: // /pages/test/load.js import Link f

Why my nextjs component is rendering twice?

This is a component that render data from firebase storage and make it listed. What the function has to do is set the videos extracted from firebase storage to