[v11] Tabs: Error when SSRing in Next.js
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- nextjs, react
- Área
- frontend
Línea de trabajo
Comienza ejecutando localmente el reproductor nextjs-quickstart-nextgen enlazado e inspecciona app/page.tsx, comparando la configuración SSR que falla con la versión en la que "use client" está habilitado. Rastrea el uso del componente Tabs y verifica que la página se renderice sin el error de elemento no válido durante SSR, manteniendo al mismo tiempo el comportamiento esperado del cliente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Love the project! Very helpful :)
With v11 alpha.7 (I'm guessing earlier versions too, that's just the only one I tested) you get an error in the browser when trying to use the Tabs component in a page that is SSR.
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
I followed this guide to setup up ReactPrime in my project: https://v11.primereact.org/docs/installation/nextjs
This might apply to other components too. I haven't tried many yet.
Reproducer
https://stackblitz.com/edit/stackblitz-starters-7lommp8z
System Information
System:
OS: macOS 15.6.1
CPU: (10) arm64 Apple M2 Pro
Memory: 1.03 GB / 32.00 GB
Shell: 4.0.2 - /opt/homebrew/bin/fish
Binaries:
Node: 20.19.4 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /opt/homebrew/bin/npm
Deno: 2.4.5 - /opt/homebrew/bin/deno
Browsers:
Chrome: 142.0.7444.135
Edge: 142.0.3595.65
Firefox: 145.0
Safari: 26.1
npmPackages:
primereact: ^11.0.0-alpha.7 => 11.0.0-alpha.7
react: 19.2.0 => 19.2.0
tailwindcss: ^4 => 4.1.17
Steps to reproduce the behavior
-
Download and run the stackblitz project. I couldn't get it to actually run in stackbliz in the browser due to issues with next.js's turbopack and wasm but if you download the project and run it locally it should work. The project is just https://github.com/primefaces/primereact-examples/tree/main/nextjs-quickstart-nextgen that is linked to from https://v11.primereact.org/docs/installation/nextjs and has been updated to the latest version of prime react v11 and nextjs + the Tabs component added and
"use client;"commented out. -
Observe the error
-
Uncomment
"use client;"in app/page.tsx -
Observe that the error goes away.
Expected behavior
No error to occur.
- Lenguaje dominante
- CSS
- Estrellas
- 8.3k
- Forks
- 1.2k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de primefaces/primereact
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
primefaces/primereact#8552 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
primefaces/primereact#8550 ·
-
Row checkbox selection tick is invisible in Landing Page Theme sectionPosiblemente ocupada @Prakash1185 la tomó hace 173 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
primefaces/primereact#8545 ·
-
Dependency conflict between jspdf v4 and jspdf-autotable during npm installPosiblemente ocupada @Kamran92 la tomó hace 187 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
primefaces/primereact#8537 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
primefaces/primereact#8551 ·
Todos los issues de primefaces/primereact
Issues similares
-
[BUG]: Shared links drop the configured basePath on GitHub PagesPosiblemente ocupada @anshulchikhale30-p la tomó hoy. Abiertobug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 82/100
Leonxlnx/taste-skill#216 ·
Los mantenedores suelen responder en 1 día
-
area: ui Bug Payload OSS
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
payloadcms/payload#19839 ·
Los mantenedores suelen responder en 1 día
-
BoxShadow.lerp returns the wrong blur style at t = 0 or t = 1Posiblemente ocupada @ArtemChikolaev la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día