Questions tagged [nextjs13]

1277 questions
0
votes
1 answer

Next JS 13 data send from client component to server side component but show Not found

JS 13 and inside my ReadMoreButton client component i push my article data using useRouter hook of NEXT. Not i can not use useRouter hook inside NEXT.JS server component so here i fetch searchParams and fetch that data. here problem is before…
user18685664
0
votes
1 answer

SyntaxError: Cannot use import statement outside a module NextJs and Gulp

I'm trying to implement i18n-perser with Next Js. According to the i18n-perser documentation I need to create a gulpfile.js on the root directory. My gulpfile.js is something like this. import gulp from 'gulp'; import { gulp as i18nextParser } from…
0
votes
1 answer

is it possible to put an element "before" layout component?

Imagine I have an app directory, inside which there are page.tsx and layout.tsx files. I have set a header and footer in layout.tsx which will be shown on every route and between them there is
{children}
But just for the home page ("/"…
0
votes
2 answers

How to generate the list of route segment parameters for every pokemon using generateStaticParams in Next.js 13?

I am trying to use Nextjs 13's generateStaticParams to render static data into my web page. How do I generate the list of routes like /pokemon/[pokemonName] for every pokemon name using the generateStaticParams without providing hard-coded pokemon…
Faab01
  • 1
  • 1
0
votes
0 answers

Configure Google Cloud Platform bucket to serve example.com/page.html when user accesses example.com/page

I'm hosting a static (NextJS) site on a GCP bucket, with my domain CNAME (let's say example.com) pointing to GCP. When Javascript is disabled, NextJS links in my generated content point to URLs like: Page…
0
votes
1 answer

Exporting a single nextJS page to html onclick with dynamic data

I'm working on a project where I need to populate a template.tsx file with the data I collect from a form and generate a html file with the collected data, then download it to the users computer. How can I achieve this with nextJS? Thanks in…
0
votes
1 answer

Next.js 13 Updating SSR Component state after action

I am learning Nextjs for the first time, and have experimented by creating a small web app that allows someone to simply register then login. Everything works, except one small issue. On the page, you can see your status. If you are logged in, it…
X33
  • 1,310
  • 16
  • 37
0
votes
0 answers

How to fetch data from Strapi in Next js 13?

does anyone know how can i fetch data from my strapi api? my usual code for fetching data in nextjs 13 is : const fetchProducts = async () => { const res = await fetch('https://fakestoreapi.com/products'); const items = await res.json(); …
queercoded
  • 55
  • 9
0
votes
0 answers

Nextjs + amplify deployment

When I deployed nextjs 13 SSR application using amplify, I don't see new CloudFront entry. Question: doesn't amplify creates it, or I should manually create amplify entry?
comalex3
  • 2,497
  • 4
  • 26
  • 47
0
votes
2 answers

Statically loading NextJS Image gives 404 on production but works on localhost

I don't understand why the static image is not found on production, but works on localhost. I put all my images in the directory: public/images/... /* image.tsx */ return (
koza
  • 71
  • 1
  • 2
  • 13
0
votes
1 answer

Next.js and Sanity V3 Studio Unhandled Runtime Error: TypeError: Cannot read properties of undefined (reading 'call')

I am trying to use Sanity V3 and Next.js 13 in order to create a blog post. But when I go to /studio an error happens Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'call') Call…
0
votes
1 answer

How to send custom props for Next.js notFound error page

In Nextjs you can declare 404 error like this: return {notFound: true}; My question is how can I send additional data for my custom 404 page to show customized error text to users? Something like this: return {notFound: true, props: {err:"Product…
mrafei
  • 345
  • 1
  • 10
-1
votes
0 answers

The `font-inter` class does not exist

The `font-inter` class does not exist. If `font-inter` is a custom class, make sure it is defined within a `@layer` directive.I am getting this error in my nextjs app. I am expercting to resolve this font-error in tail wind css. The error is…
-1
votes
1 answer

Nextjs13 Error: Failed prop type: The prop `href` expects a `string` or `object` in ``, but got `undefined` instead

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

Adding CDN in NextJs 13 project not working

When I want to add a CDN such as the Remix Icon one in my NextJs13 project, it doesn't work, I was researching and the way it is done is import, the "head" tag and then put the values ​​inside the Head component, but that's already It doesn't work…