Category "next.js"

Cannot deploy Next.js to Netlify. Deploy failed due to an error in @netlify/plugin-nextjs plugin

I can run npm run build with no problems at all, but whenever I try and deploy my Next.js project to Netlify I get an odd error stating Deploy failed due to an

Next failed to load SWC binary

When trying to run the command using nextjs npm run dev shows error - failed to load SWC binary see more info here: https://nextjs.org/docs/messages/failed-load

How to get localStorage, createContext, withrouter and history, component from react to work on client side while using NextJs?

I am trying to get the localStorage to work but I do not know how to load the code on just the client side. Also to just have certain files run with the informa

Vercel 500 internal error! Cannot get logged in

[GET] /auth/signin?callbackUrl=http://localhost:3000 17:22:23:77 2021-10-24T12:22:24.062Z a07d6ace-3b47-4472-a45b-f7ef9989a9b5 ERROR [next-auth][err

Next.js: How to make links work with exported sites when hosted on AWS Cloudfront?

I'm trying to get a prototype Next.js project up by doing a Static html export (i.e. next export) and then copying the generated output to AWS S3 and serving it

Typescript says NextJS environment variables are undefined

I'm trying to make social login using 'react-google-login'. .env in root NEXT_PUBLIC_GOOGLE_CLIENT_ID=askfjaskf Ready.tsx import { GoogleLogin } from "react-go

How to route to page using Dynamic Routes in next.js

I am trying to route these urls to [id].js file in next.js, So everything is working for url 2 and 3 below, but its not working for url 1 so I have to create an

React + NextJS - Protected routes

Objective : I want to redirect a logged in user to the home page if he/she tries to manually go to the /auth/signin. Signin page/component : const Signin = ({

Importing react into pages in next.js (and also React and CRA apps)

I have a Next.js app with several pages in it. All of the pages look similar. import React, { Component } from "react"; import from "components/Wrapper"; expo

Get client IP in getServerSideProps method in NextJs [duplicate]

I am trying to find the IP of the client in getServerSideProps in NextJs. I simply use basic IP found methods but when I call that method in g

NEXT/Image Component URL issue

I am using NEXT/Image component and facing this issue: When I open the source code on chrome the image src is this: https://www.example.com/_next/image?url=%2Fi

NextAuth authentication not working on Deployment on Vercel (Working on localhost)

Used credentials for authentication with nextauth. My code is not working on vercel deployment but working on localhost. I used the basic cresdentials for authe

How to upload a single image file with next.js to mongodb?

When I'm uploading form data to mongodb, in the image section it shows this: "C:\fakepath\imageName.jpg" with no actual image in it. And when I fetch the data f

Next.js API routes all return "Interval Server Error" in production, but all the routes work in development

Whenever I go to any API route in my Next.js app in production it returns a 500 "Internal Server Error" but in development, all of them work completely fine and

NextJS Deployment Error : The repository couldn't be found in your linked GitHub account

I am unable to deploy my React NextJS app of vercel. It gives the below error while clicking the deploy button : The repository "NetflixCloneReact" couldn't be

Import .svg and resize .svg use styled-components in next.js

I am currently trying import .svg into next.js project but I failed. I tried import .svg same way as in react project, that I created typing.d.ts and import svg

Authentication on Keycloak through REST API (Next JS)

I have a problem. I need to login in Keycloak, but i don't want to use default pages from Keycloak. I have pages for "sign-in" and "sign-up". I wrote requests a

Router.push('/') would display nothing

When I try to go to the home page for a user who is not logged in with Next JS, the path moves, but nothing is displayed. if (!currentFBUser) { return Rou

How to fix Next.js Vercel deployment module not found error

My next.js app works on my machine and was working when deployed on Vercel but now it fails when building on Vercel with the following error: I've tried delet

Error while using flowbite with nextJS and typescript

I installed tailwind and flowbite to a NextJS project. As I did import "flowbite" in _app.tsx, I get the following error. ReferenceError: document is not defin