question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MUI with next/image got React Hydration Error

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

I’m started with https://github.com/mui-org/material-ui/tree/master/examples/nextjs-with-typescript and use next/image

import Image from 'next/image';

export default function Logo() {
  return <Image src="/logo.png" alt="logo" width={130} height={65} />;
}

then got “Warning: Prop style did not match” in console.

Expected behavior 🤔

Get rid console error.

Steps to reproduce 🕹

Steps:

  1. Get start with https://github.com/mui-org/material-ui/tree/master/examples/nextjs-with-typescript
  2. Create Logo component
  3. Add to page

Context 🔦

Having error in console.

Your environment 🌎

`npx @mui/envinfo`
  System:
    OS: Windows 10 10.0.22000
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22000.120.0), Chromium (96.0.1054.62)
  npmPackages:
    @emotion/react: ^11.7.1 => 11.7.1
    @emotion/styled: ^11.6.0 => 11.6.0
    @mui/base:  5.0.0-alpha.62
    @mui/icons-material: ^5.2.5 => 5.2.5
    @mui/material: ^5.2.6 => 5.2.6
    @mui/private-theming:  5.2.3
    @mui/styled-engine:  5.2.6
    @mui/system:  5.2.6
    @mui/types:  7.1.0
    @mui/utils:  5.2.3
    @types/react: 17.0.38 => 17.0.38
    react: 17.0.2 => 17.0.2
    react-dom: 17.0.2 => 17.0.2
    typescript: 4.5.4 => 4.5.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
overbidcommented, Jan 3, 2022

That’s Dark Reader (Browser’s Extension) fault.

0reactions
overbidcommented, Jan 3, 2022

Now the issues is gone with nothing fix. Sorry for wasting your time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-hydration-error - Next.js
In general this issue is caused by using a specific library or application code that is relying on something that could differ between...
Read more >
How to solve react hydration error in Nextjs - Stack Overflow
In this example, you will get the React Hydration Error if the <a> tag is used inside another <a> tag.
Read more >
MUI with next/image got React Hydration Error #30466 - GitHub
then got "Warning: Prop style did not match" in console. Expected behavior. Get rid console error. Steps to reproduce. Steps:.
Read more >
Fix Next.js “Text content does not match server-rendered ...
Learn how to fix the React hydration error “Text content does not match server-rendered HTML” so you can personalize & transform HTML in ......
Read more >
How To Solve Hydration Error In Next.js | by Westin Tang
The code in react-dom will use tryHydrate to try the hydrate operation, if it fails, the mode and flags will be checked and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found