'Error in React config folder while installing/using a Material UI component

I am building my first app in React and installed Material UI for the first time. While inserting a form component into my JSX, I get this error "TypeError: Cannot read properties of null (reading 'useContext')" coming from a folder node_modules/react/cjs/react.development.js which I imagine is the "backend" of React.

Here is the error : enter image description here enter image description here

Here is the code :

import React from "react"
import {TextField} from '@mui/material'

function Homepage(props) {
  return (
    <section className="homepage-section white-bg">
      <div className="section-top">
        <h2><strong>Contactez-nous</strong> si vous avez la moindre <span className="special-font"> question </span></h2>
        <h3>Que vous souhaitiez proposer des <strong>actions</strong> ou tout simplement rejoindre la <strong>communauté</strong> !</h3>
      </div>
      <TextField />
    </section>
  )
}

I have absolutely no idea on how to fix that myself. Any help ?



Solution 1:[1]

I manage to fix this issue by uninstalling MUI and reinstalling !

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maxime Crtgn