Next.jsのエラー一覧と解決方法(12件)
実在のNext.jsエラーメッセージを収録。各ページで原因と直し方を日本語で解説しています。
- Error: Hydration failed because the initial UI does not match
- Error: Text content does not match server-rendered HTML
- You're importing a component that needs useState. It only works in a Client Component
- Error: Dynamic server usage: cookies
- Module not found: Can't resolve 'fs'
- Error: Image with src is missing required width property
- Error: Invalid src prop, hostname is not configured under images
- Error: NEXT_PUBLIC_ env variable is undefined in the browser
- getServerSideProps cannot be used with app directory
- Error: Functions cannot be passed directly to Client Components
- Hydration error: did not expect server HTML to contain a <div> in <p>
- Error: Route used cookies or headers, but no Suspense boundary
エラー文を貼って探すならエラーメッセージ検索ツールが便利です。