next.js13 Questions

5

Solved

The problem I'm making a website with a supabase backend, where people can make things called guides. Each guide has a dedicated dynamic path /guides/[id] and a dedicated edit page /guides/[id]/edi...
Dealing asked 7/12, 2023 at 9:22

3

Is there a way to get the request object (NextRequest) or at least the request URL inside a server component (Page and/or layout components) using NextJS 13 and the new app directory? I know how to...
Matted asked 22/3, 2023 at 17:32

5

I'm using the dynamic og image feature in the app dir. Basically, I create a opengraph-image.tsx file and it will autogenerate me an og image. However, in production the src of the og image is set ...
Husk asked 10/5, 2023 at 10:3

5

Solved

Im using NextJs 13 and redux toolkit. When i try the npm run build command, i get this error: Cannot destructure property 'store' of 'useReduxContext(...)' as it is null. I think this has something...
Woolfolk asked 16/2, 2023 at 15:21

2

First of all here is my code in react import { useFormState, useFormStatus } from 'react-dom' import { submitAction } from './action.ts' export default function Calculator() { const [result, subm...
Mantelletta asked 14/1 at 18:0

4

I'm trying to delete a cookie using the next/headers module in a Next.js application, but it doesn't seem to work as expected. Here's the code snippet: import {cookies} from "next/headers&quot...
Blond asked 19/6, 2023 at 18:25

3

I am not able to read the select value in shadcn form Select. I am using serveraction. So, I am creating a form to send emails, i am able to read the values of other fields but not the value for Se...
Silberman asked 4/12, 2023 at 7:20

3

I have a pretty minimal app at the moment implementing redux (following the official redux docs) and implementing some persistence of the data to local storage. I am facing a very stressful problem...
Hidden asked 9/1 at 17:21

7

Solved

The following function fails with error "Auth Session Missing" const { error } = await supabase.auth.updateUser({ password: password, }); After getting the reset password link on my mai...
Borst asked 20/7, 2023 at 19:46

4

So I know that to block Pinterest on my site I need to embed this in my site's header <meta name="pinterest" content="nopin" />, but I'm not sure how to do that in Next 13...
Mecklenburg asked 4/4, 2023 at 8:5

6

Solved

Here is my authOptions code which is running perfectly on localhost. import NextAuth, { NextAuthOptions } from "next-auth"; import GoogleProvider from "next-auth/providers/google&quo...
Electric asked 11/12, 2023 at 5:35

4

I was trying the Next 13 beta version, and I faced a strange problem. What I am trying to do is, fetch data on the server side and display them on the page. However, the "fetch" operation...
Nierman asked 13/12, 2022 at 3:31

3

I'm still a beginner in Nextjs I get range error when i try to fetch products from database, ihave the same exact code for categories with no problem at all... this my nextjs server action: export ...
Confessor asked 12/9, 2023 at 8:41

2

Solved

I am creating a custom combobox using shadcn, and passing data as prop parameter which is working, the issue persists when i am getting the loist the list is disabled andi am not able to select any...
Mixup asked 11/4 at 7:7

4

After setting the cookie, I can not read it in the middleware , I have to reload the page then I can read the cookie. Why did this happen? I set cookie like the following: import { getCookies, setC...
Postfix asked 15/3, 2023 at 23:28

2

Solved

With the old pages router, I could await router.push. I used this to keep a button disabled while we are in the process of navigating to another page: async function onSubmit(input: CreatePostForm...

5

I use Next 13.4.3. I don't have an API folder in the app folder as described here, by default all pgaes.tsx etc. are in the app folder SSR: https://nextjs.org/docs/app/building-your-application/rou...
Marche asked 22/5, 2023 at 11:24

2

Solved

Next version: 13.4.12 Node version: 18.17.0 When I create a next app with "npx create-next-app@latest" and npm run dev immediately after creating it, I am getting the following error. Ser...
Pronto asked 3/8, 2023 at 14:53

11

From this answer and this article I've added a <Script> in order to add Google Tag Manager to my NextJS website: components/layout.tsx: import React from "react"; import Head from...
Rubberize asked 22/4, 2023 at 3:5

2

How to pass data from the server component to the client component in Next.js 13 app router? I am calling an external API in page.tsx which gives the city of the person. I want to pass this city to...
Bobstay asked 1/6, 2023 at 16:51

1

I added global-error.tsx file to the Next.js project v 13.4.16. I am wondering how I can simulate it to see how this looks like in UI during development. I keep my global-error.tsx file on the same...
Blastomere asked 14/12, 2023 at 18:43

15

Solved

I have an issue with the new Next.js App Router. They removed head.js files and now (as it is written in the doc) I have to use metadata in layout.ts. My favicon name is favicon.png. How do i speci...
Flanagan asked 8/3, 2023 at 15:14

7

I don't know how to use 'next-auth/middleware' and 'next-intl/middleware' together in the middleware. Next-auth gets exported as default and it's a must... on the other hand Next-intl creates a mid...
Lactic asked 21/6, 2023 at 4:35

4

I have a simple nextjs 13 application (appDir) with 2 pages and a <Link/> component navigation. first page Home - static second page Test - receiving dynamic random content on the server sid...
Flatworm asked 22/12, 2022 at 4:24

5

I need to access user session data in a Next-Auth/Nextjs 13.4 API Route. I have configured the JWT and Session callback; however, the user data I specified in the callback function does not transla...
Starlet asked 21/7, 2023 at 17:54

© 2022 - 2024 — McMap. All rights reserved.