Questions tagged [app-router]
116 questions
4
votes
1 answer
How do I pass data from server component to client component in Next.js 13 app router?
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 the client component where this city can be…

Vishal Pawar
- 43
- 1
- 5
4
votes
1 answer
Implementing module federation, app-router, and webpack with Next.js 13 - how to fix 'client-only' error?
I am currently working on implementing module federation in Next.js 13.4.4, utilizing the app-router feature and the @module-federation/nextjs-mf package. In order to achieve a micro front-end architecture, I have created a host app that imports…

Pouriversal
- 66
- 2
- 6
3
votes
1 answer
How to correctly use the API routes in the Next JS 13 Using App Router framework
I'm fairly new to React JS and Next JS. I was previously using the Page Router API on Next JS but then switched to use the new App Router on Next JS 13.
Previously, using the Page Router, the structure to create a single get request was to nest your…

BlackLabrador
- 2,829
- 5
- 18
- 21
3
votes
3 answers
How to use Redux Toolkit with Next.js and App-Router?
How to use Redux toolkit in NextJS 13 App router ?
These are all my slices and code related to redux toolkit Is there anything wrong with the code coz I get this error in terminal saying , I think In Nextjs 13 we have to create a seperate provider…

Bipin
- 53
- 4
2
votes
0 answers
Error to call Approuter from Postman - SAP CAP (BTP) - *.us10-001.hana.ondemand.com/login/callback redirect
I am new to SAP BTP and currently setup a simple project with a server and approuter on SAP CAP in nodejs. But when querying the approuter url from postman it gives me the following error:
Response:
2
votes
1 answer
Next js 13 App router build error. (when i try fetch api route in server component)
I get an error when i build next app (yarn run build)
I made new clean project i tried there.
This is my route (/api/categories/route.ts)
export async function GET() {
return new Response(JSON.stringify({ msg: "categories" }));
}
And my…

Илья Маковецкий
- 41
- 2
2
votes
0 answers
NextAuth gives error OAUTH_CALLBACK_ERROR invalid_client when authenticating with a custom provider
I'm trying to use NextAuth to authenticate with a custom oauth2 provider (Whoop), but after the login completes on the whoop servers and I'm redirected back to my application, NextAuth throws the following…

Eliot Hertenstein
- 135
- 9
2
votes
0 answers
how to fix Nextjs13 could not find the module app-router.js#
after running npx create-next-app@latest, I said yes to use App Router(as it recommends to use it). but after that when I run npm run dev I'm getting the following errors.
Uncaught Error: Could not find the module…

Sahil
- 21
- 2
2
votes
1 answer
How to load different components on a static URL
I have three pages application where first page have URL with menu name like -
http://localhost:3000/careers/
and second page where listing page loaded and it's URL is optional parameters like, If i choose skill then it will append…

neha910
- 199
- 3
- 12
2
votes
1 answer
Polymer app-route return empty data attributes
I'm learning Polymer and i got some issues with app-route and app-location. I tried a simple example like this:

Gwenolé Gerard
- 21
- 1
1
vote
1 answer
Error: Failed to fetch RSC payload. Falling back to browser navigation
I made a search form that redirects the user to the page that shows the results of his search. When I click the search button, this error occurs
Failed to fetch RSC payload. Falling back to browser navigation. TypeError: Failed to fetch at…

Ioan
- 25
- 4
1
vote
1 answer
how to create api with app router in next?
I have setup new next project and used the app router as next recommend this in latest version. Now I want to create the API so how can I create and use this API inside my page app/user/page.tsx?
I have create one API inside the…

Kishan Bhensadadiya
- 330
- 2
- 12
1
vote
1 answer
Integrating Laravel Breeze API with NextAuth.js in Next.js v13.4 using AppRouter
I'm seeking guidance on integrating my Laravel Breeze API with my Next.js frontend. While there are examples available for integrating Laravel Breeze API with Next.js using the Page Router for client-side rendering (CSR) and SWR for server-side…

karmendra
- 2,206
- 8
- 31
- 49
1
vote
0 answers
Next.js 13 fetch by ID, but slug in url
In a Nextjs 13 project, using App router I have an API and it needs to fetch single posts by id. However, I want to have the name of the post in the slug instead of the id, but still access the id. Is it somehow possible?
My project structure is…

levipadre
- 569
- 7
- 31
1
vote
0 answers
How to fix "Error: invariant expected app router to be mounted"
I am using the App router in my Next.js project and I have a component named search.tsx which imports useRouter from next/navigation.
'use client';
import { useRouter, useSearchParams } from 'next/navigation';
import { useEffect, useState } from…

Sahan Kodituwakku
- 11
- 2