Earlier my Next.js application started throwing TypeError: Cannot read properties of null (reading 'default') without me changing anything in my code where I'm rendering some articles from our CMS.
Here is the complete log:
And here is my code:
import Image from "next/image";
export default function Articles({ articles }) {
return (
<div className="articles">
{articles.map((article) => (
<div className="article" key={article.id}>
<div className="text">
<h2>{article.title}</h2>
<p>{article.content}</p>
</div>
<div className="image">
<Image src={article.image} alt="" height={900} width={900} layout="responsive" />
</div>
</div>
))}
</div>
);
}
