next.js13 Questions

3

Solved

Using Clerk Auth, I have a working login/sign-up flow with Next.js 13 middleware. When a user signs up, I want to add a row to my DB's Users table. The problem with middleware is that it runs on ev...
Spense asked 6/8, 2023 at 6:52

5

has anyone successfully gotten google analytics to work on NextJS 13? I've followed this thread: How to implement Google Analytics with NextJS 13? but when I do the same thing on my app, nothing sh...
Aldwin asked 1/5, 2023 at 1:26

7

This is the sturcure of my next.js project. And my 404.js page is : 'use client'; export default function NotFound() { return ( <div> <h2>Not Found</h2> </div> ); } ...
Alyssaalyssum asked 31/1, 2023 at 19:41

2

in NextJS 13 with app folder, I need to get data based on url (language from e.g. /en/asdf/ or /de/asdf/) and pass it to components. I tried using middleware and it seemed to work relatively well u...
Thinner asked 10/12, 2022 at 22:15

3

I am working on a React project with NextJS 13 and I have problems with using request memoization for fetch. It always sends request to backend even in the same request. I have a simple endpoint at...
Despinadespise asked 7/10, 2023 at 9:36

1

I am using Next-Auth v4.22.1 and NextJS 13. I am trying to sign out a user inside the [...nextauth].js jwt callback. I know that signOut() is only available on the client side. If it is used on the...
Phony asked 29/4, 2023 at 7:32

3

I am working on a Next.js application and I have defined an action under app/actions/create-foo-action.js. I am trying to send a response back to the client from this server action. import { connec...

4

I'm curious how we'd be able to go about accessing returned values from Next.js 13's alpha release of server actions. Here's the documentation from the Next team for reference. Let's say I have the...

3

Complete Error: Attempted to call the default export of /email/contact-form-email.tsx from the server but it's on the client. It's not possible to invoke a client function from the server, it can ...
Aves asked 27/9, 2023 at 18:39

5

Solved

I want to be able to rename page.tsx files in nextjs 13 app directory to something like theRouteName.page.tsx or something like this. because if all the pages are named page.tsx it's gonna be a pai...
Kiele asked 12/6, 2023 at 19:29

2

Solved

tl;dr Next.js 13's /app router's layout and page routing changes how we add content to the <head>. How can I add a schema script to each page? Next.js will automatically compile <head> ...
Philips asked 20/7, 2023 at 16:36

0

I have the following problem in a NextJS app on Heroku. (Next: 14.0.1) This is a link pointing to a dynamic route: https://myapp.herokuapp.com/LYS5569npeck I can open it in my Firefox browser and ...
Birchfield asked 14/11, 2023 at 10:22

1

Solved

I have written a Nextjs 13 page component which is an async function. It calls an API inside it and passes that response to the child component. export default async function Home() { const partic...
Garlandgarlanda asked 17/8, 2023 at 13:26

4

Solved

I am having the following error when I use the react-email package in my next.js project the problem is caused by the Tailwind component so when I comment it out it works but since I want to apply ...
Borges asked 28/9, 2023 at 13:27

3

I am using Next.js 13 and Prisma ORM to fetch data within a server component and make it available to child components through a context. The route is structured as follows: /item/[id], and the id ...
Manure asked 13/5, 2023 at 20:14

1

Solved

I am using MSW to mock server requests. I recently updated to v2, after which began seeing a module not found error when trying to import setupServer from the msw/node import path. I can see the fi...
Bottrop asked 1/11, 2023 at 0:49

5

I carefully read the docs of next routing system. It only mentions that I could achieve dynamic routing like this: http://localhost:3000/level1/dynamicSlug But I am trying to achive something like ...
Valvule asked 25/8, 2019 at 18:30

1

Solved

I recently transitioned from a page router to an app router due to its advanced features. However, I've encountered a dilemma and find myself perplexed regarding the implementation of SSR and data ...
Tingley asked 30/10, 2023 at 5:48

2

Solved

Searching around gives some varied answers around the right way to return a response to an API in NextJS. I suspect some may have to do with the transition from pre-13.4 to 13.4. However, I am goin...
Orangutan asked 20/10, 2023 at 17:4

1

Solved

How do I use the my MUI (material ui) theme definition in a server component. I'm usually using the very useful useTheme hook. But this forces me to make it a client component, using the 'use clien...

3

I need to lookup an entry from the database and generate the metadata and render the actual page contents. At the moment, I am doing it like so: export const generateMetadata = async ({ params: { ...
Roister asked 7/6, 2023 at 23:43

1

Solved

Previously, throwing errors in the apis looked like this. if (error) { return response .status(500) .json({ error: 'Error getting data from Supabase' }); where the response was a NextAPIRespon...
Banjermasin asked 20/10, 2023 at 20:25

5

Solved

I have a question regarding Next 13.4. Since today I can only use Next 13.4. I wonder where the api folder has gone. It is no longer created in this version. It still worked in 13.3. How can I now ...
Squander asked 9/5, 2023 at 12:25

1

This is a simple error, am created a next.js 13.5 latest project. and then install material-tailwind. then for testing when am use Just click me from material, in development mode it's running perf...
Carillo asked 10/10, 2023 at 10:21

1

I've been playing with the Taxinomy project from Shadcn. The fetch calls to the internal API don't include the app's base URL (http://localhost:3000 or the actual website for production). // Get st...
Eberly asked 10/5, 2023 at 11:51

© 2022 - 2024 — McMap. All rights reserved.