Category "next.js"

Next JS: getServerSideProps cant get cookie [duplicate]

I want to return two cookies, but only one is returned only token cookie, while key cookie cannot be used export async function getServerSideP

Next.js | How to improve seo when doing dynamic routing with ssr

I am writing dynamic routes code in, like the code below. So my question is, this dynamic routes page is not reflected in google at all. I have dynamically set

Getting the error "Next.js unmet peer dependency error " when installing next.js app

So , when I'm trying to create a new Next.js app using npx create-next-app@latest todo-app command , I get this following error while It's being installed : "e

How to display subdocuments on frontend i am using mongodb as the database

This is the front end. I have made some changes you can check out my repo if anyone has any answer to this it'll be great use i think there is there a way to li

Next.js 12 ( with react ): Cannot read env variables, process.env is undefined

I'm using next.js 12 with a react app. I have the following .env.local file: NEXT_PUBLIC_DEVELOPMENT_ENV_VARIABLE="public_development_variable" I start the dev

I am not able to run yarn export command even I have updated my packages.json file - A next.js related question

PS C:\Users\sujee\Desktop\Next App\panda> yarn export yarn run v1.22.18 $ next build && next export info - Checking validity of types Failed to com

Unable to deploy a Next.js monorepo using workspaces to Vercel

I've been having Vercel deployment issues when trying to convert my existing Nextjs app to be a monorepo using either npm or yarn workspaces. After changing to

When refreshing a page developed by nextjs error occurred

I have developed a project by nexjs which their backed is IIS and all these are working properly. I have an URL address like this : dastshafa.ir/product/2/

<Link> does not work as expected in NextJS

I am working on creating a Next.js app and part of it requires me to create a dynamic route on click of a card component. However, after wrapping my Cards with

Why I am getting this error: declares '<MODULE>' locally, but it is not exported

I have a typescript file which exports a function to send emails using aws ses //ses.tsx let sendEmail = (args: sendmailParamsType) => { let params = {

How to make path for pages in NextJS case insensitive

I have a file under the pages folder named about.tsx. So the path for the page is /about and I'm able to access the page by visiting example.com/about. However,

Markdown is not being displayed correctly due to CSSReset - Chakra-ui

I'm making a NextJs Blog, and I have to render my markdown in a dynamic page. CSSReset is being used in my app, and as a consequence, markdown is not being disp

NextJs - External synchronous scripts are forbidden

I am using nextJs version 11.x When trying to include an external script like below, getting an error when executing the yarn build. <Head> <link rel="

VSCode does not auto-import from "react" in Next.js projects

* This is not a duplicate of this question; the accepted answer there is made for TypeScript and doesn't seem to work for JavaScript. I am working on a 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