Questions tagged [nextjs13]
1277 questions
-1
votes
1 answer
How to persist and set global state for client from server in NextJS 13.4?
PROBLEM: In NextJS 13, for example, your Navbar lives in the root layout.tsx folder. It checks auth, then fetches user, you want the user to be available globally to all pages regardless of server component or client component, since the Navbar…

darren z
- 3,051
- 3
- 13
- 28
-1
votes
1 answer
Secret values are not showing
I have a SPA with NextJs that submits a contact form to Google sheet, which works perfectly fine locally and give me a 500 error in production.
on my .env file I have as…

peakyBlinders
- 3
- 4
-1
votes
1 answer
Nextjs 13 Post request api is not working in production
I built API routes in Nextjs. GET and POST request are working fine in localhost. When I built and deploy in IIS, POST request is not working. Instead I receive 500 internal server error. Whereas GET request is working fine without any problem.

karthi
- 31
- 2
-1
votes
1 answer
Why the request to NextJS api route inside app directory gives 500 response code?
When I try to call my API route I receive a 500 code Internal Server Error
Place of making the request
export const fetchSuggestion = async () => {
const response = await fetch('/api/getSuggestion', { cache: 'no-store' })
const data = await…

Pickez
- 45
- 1
- 6
-1
votes
1 answer
Next authentication JWT
I want to implement JWT auth in my Next app. Currently, I see the flow as following:
email and password are sent to the server to log in
server returns a response with status 200 and jwt access token in httpOnly cookies
The main problem is I don't…

medreres
- 19
- 6
-1
votes
2 answers
Why won't my bg image render in Next 13 app?
I thought this was a relatively straightforward thing to do but apparently not. I have a bg image in a global scss file that does not wwant to render. It seems all of the other styles in the file are working and I don't belive the file paths are the…

Mr_Yellow7
- 27
- 5
-1
votes
1 answer
does next link has built in style
Next Link ruin my style (display flex)
{res.results.map((movie) => (

Ronell Villamil
- 9
- 2
-1
votes
1 answer
NextResponse Is return 500 Inter ServerError
I am trying to use the NextResponse from next/server. I am getting a status 500 and internal server error when i call the api. The condition.
if (response.status === 202)is true and is able to enter the if block.
export async function POST(request:…

George Jose
- 166
- 1
- 1
- 11
-1
votes
1 answer
how to get seesion in page.js file in next 13
I am not able to get session data to call API on page
in next 12 > getsession(")was working
in next 13 > ??
tried these two methods and getting initial data
getsession()
usesession()

Jayesh karma
- 9
- 2
-1
votes
2 answers
I did not get data from the api. I need fetch data from API
import { GetServerSideProps, NextPage } from 'next';
import Image from 'next/image';
import React from 'react';
import photo from '../../assets/photo.jpg';
type Products = {
data?: {
id: number;
title: string;
body: string;
…

S M Fahim Hossen
- 21
- 3
-1
votes
2 answers
How to manage links in a Nextjs application
I have a Nextjs application. The app will grow to a nice size (200 pages)
What is the best way to manage links. Some pages will have navigation buttons and and hrefs, hyperlinks.
I am looking for solution to manage
Example: pages -> about, contact,…

Jerry seigle
- 79
- 2
- 11
-1
votes
1 answer
onChange doesn't trigger in my React application
I'm trying to built a random football team picker and I'm doing the database myself.
I'm having a problem with the inputs
import React, { use, useRef, useState } from "react";
const fetchAll = async () => {
const getAll = await…

Agustin
- 1
-2
votes
1 answer
path.startsWith is not a function in next js
Why it is showing me path startsWith error. I'm trying to send the amount to the path
import { useRouter } from 'next/navigation'
const checkoutHandler = ()=>{
router.push({
pathname: '/checkout/[amount]',
query:…

sohaib
- 574
- 5
- 16
-2
votes
1 answer
Cannot Find name h1 - HTML Tag on .tsx file Next.js Project
enter image description here
I get some highlight syntaxis on my .tsx file, as usual, i made a next.js project but using typescript.
I have tried to change tsconfig jsx to react-jsx, and make sure the file extension was .tsx, but vscode still give…

Rizki Ramadhan
- 11
- 4
-3
votes
0 answers
Can't remove white border around page in NextJS app
I just started an app on NextJS and can't seem to remove the white borders around the page. I've used NextJS before and have inspected my previous projects, and even tried copy/pasting the code from there to here and still the white border remains.…

Rachel Nguyen
- 11
- 2