Questions tagged [next.js13]

339 questions
0
votes
1 answer

Runtime Error Cannot read properties of undefined (reading 'call') when migrating from next12 to next13

npx create-next-app After that I added the support of app directory by adding experimental : { appDir : true, } Finally, I got rid of the pages folder and created the app folder with the following…
voq
  • 73
  • 1
  • 9
0
votes
3 answers

Next.js 13 routing params

Hi folks first of all i am new to react and nextjs. So i am sorry if my question is stupid. I am currently building a navigation with nextjs 13 within new the app folder. Here is my navigation component where i am building the category links with…
AndiGo
  • 1
  • 1
  • 2
0
votes
0 answers

How to use isomorphic Apollo link with nextjs 13?

I tried to use this, but it doesn't work with app directory. This got an error: error - ./node_modules/nexus/dist-esm/typegenAutoConfig.js:55:0 Module not found: Can't resolve 'fs'
0
votes
1 answer

Next.js13 MiddleWare occurs [TypeError: Class extends value undefined is not a constructor or null]

My Next.js project try middleware to ver13 occuring [TypeError: Class extends value undefined is not a constructor or null]. but when I try ver12. that is no error and working fine. Does anyone could helping me? /middleware.ts import { NextRequest,…
y-tom
  • 25
  • 5
0
votes
0 answers

Next.js 13 Server Components > Access Route Segment From Root Layout

Is it possible to access the current selected layout segment from a component placed inside a root layout? i.e. export default async function RootLayout({ children, }: { children: React.ReactNode; }) { return ( …
Ryan Roberts
  • 318
  • 1
  • 4
  • 12
0
votes
0 answers

Proper way to proxy all calls to an external API through the Next.js server? (Make SSR components work with client auth cookies)

I have a rails API running in the same cluster as my Next.js13 server. The rails API uses auth cookies to track the session. I can log into a client side component and start making authenticated API calls based on the set-cookie header I receive…
pixelpax
  • 1,435
  • 13
  • 22
0
votes
0 answers

LitJsSdk fails when I run Next.js 13 with turbopack, but no error with webpack

This is the code is in my /app/lib/litProtocolFunctions.ts file which is where I reference LitJsSdk: //@ts-ignore import LitJsSdk from 'lit-js-sdk'; import { baseUrlConf } from '@/lib/config'; export function disconnectLit() { …
ChristianOConnor
  • 820
  • 7
  • 29
-1
votes
3 answers

What typeof searchParams Props for Typescript?

I'm newbie at typescript and my codes: type searchParamsProps = { manufacturer: string, model: string, year: number, fuel: string, limit: number, } export default async function Home({ searchParams }: searchParamsProps) { const allCars…
InSho
  • 1
  • 4
-1
votes
1 answer

Dynamic Links with url properties not passed while routing in nextjs13

I'm learning nextjs using book "Building React Apps using server-side rendering" In this I'm building basic react app with index page link to about page. The project package.json - { "name": "my-next-app", "version": "1.0.0", "description":…
user51
  • 8,843
  • 21
  • 79
  • 158
-1
votes
1 answer

How to access a state variable from a client component in a server component in Next.js?

I am trying to use state variable from a client component which accepts certain form values from the user in component A and then I need to use those values in component B which is a server component and is mainly responsible for querying a .XML…
Ishaan_B
  • 9
  • 6
-1
votes
1 answer

Issue with post request in sanity.io and Next.js 13

I have been trying to post a new user to my sanity content lake using the sanity mutation but for almost a week now, I kept on getting same error. This is the error: http://localhost:3000/api/register net::ERR_ABORTED 500 (Internal Server…
Rengkat
  • 23
  • 8
-1
votes
1 answer

How to disable route pre-rendering in Next.js?

I am using route handlers. I have a route such as app/blog/rss.xml/route.ts: import { getBlogPosts } from '@/routines/getBlogPosts.ts'; import Rss from 'rss'; const SITE_URL = 'https://ray.run'; export const GET = async () => { const blogPosts =…
Luc Gagan
  • 301
  • 9
-1
votes
1 answer

Next.js 13 showing loading.tsx whenever useState() setter is called

I have a client component with a simple text field which is used with useState() hook. Whenever I change the text and onChange is called, I see the loading UI defined in loading.tsx and then the updated UI. But the text field is not focused…
LarsDev
  • 37
  • 6
-1
votes
1 answer

Choosing Between Next.js 13 AppRouter and pure React for Admin Dashboard

Is it a good idea to use Next.js 13 App router for programming an admin dashboard, or should I build it as a single-page application using pure React? Next.js seems to struggle with interactivity on slower connections. Which option offers better…
Jiri K
  • 45
  • 5
-1
votes
1 answer

How to read and parse a JSON file using fs.readFile in Next.js app router directory?

i want to read a json file data using fs.readFile in next.js 13.4 APIs in app router(directory) and parse it by JSON and display it. But it is showing the JSON content in console.log but not while i am returning it by NextResponse. Also there are…
neel_G_ji
  • 17
  • 2
1 2 3
22
23