[v11] Tabs: Error when SSRing in Next.js
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nextjs, react
- 領域
- frontend
調査の方向性
まず、リンクされている nextjs-quickstart-nextgen の再現コードをローカルで実行し、app/page.tsx を調べて、失敗する SSR セットアップと "use client" が有効になっているバージョンを比較します。Tabs コンポーネントの使用箇所を追跡し、期待されるクライアント動作を維持したまま、SSR 中に無効な要素エラーなしでページがレンダリングされることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- CSS
- スター
- 8.3k
- フォーク
- 1.2k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
primefaces/primereact のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
primefaces/primereact#8552 ·
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
primefaces/primereact#8550 ·
-
Row checkbox selection tick is invisible in Landing Page Theme section対応中かも @Prakash1185 が 173 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
primefaces/primereact#8545 ·
-
Dependency conflict between jspdf v4 and jspdf-autotable during npm install対応中かも @Kamran92 が 188 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
primefaces/primereact#8537 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
primefaces/primereact#8551 ·
primefaces/primereact の issue をすべて見る
似ている issue
-
[BUG]: Shared links drop the configured basePath on GitHub Pages対応中かも @anshulchikhale30-p が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
StabilityNexus/IdentityTokens-EVM-Frontend#182 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1時間未満 初心者へのやさしさ 82/100
Leonxlnx/taste-skill#216 ·
メンテナーはふだん 1 日以内に返信
-
area: ui Bug Payload OSS
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
payloadcms/payload#19839 ·
メンテナーはふだん 1 日以内に返信
-
BoxShadow.lerp returns the wrong blur style at t = 0 or t = 1対応中かも @ArtemChikolaev が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信